Results 1 to 6 of 6

Thread: SMTP relay for localhost and RFC1918 subnets

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    brooklyn
    Posts
    25
    Rep Power
    9

    Default SMTP relay for localhost and RFC1918 subnets

    I would like to use Zimbra's postfix as an unauthenticated outgoing SMTP relay for mail originating from localhost and all RFC1918 addresses in the Zimbra server's subnet. I happen to like the mutt MUA so I'm using it on localhost as the testing client. This applies only to mail sent from a MUA besides Zimbra's web interface, which is lovely...but it's all about choice, right? Anyhoo, Here's where I'm stuck.

    Open mutt with
    Code:
    mutt -f imaps://localhost/INBOX
    then login as normal. View messages in inbox. Create new message to address external from Zimbra domain. Set From: user@zimbra.domain header in mutt. Send message. mutt reports message is sent successfully. Message never reaches it's destination. There is no bounce. It's gone. Running
    Code:
    /opt/zimbra/postfix/sbin/mailq
    says queue is empty, so the message must have gone somewhere. But where?

  2. #2
    Join Date
    Nov 2005
    Posts
    63
    Rep Power
    10

    Default

    The postfix configuration file (/opt/zimbra/postfix/conf/main.cf) has the "$my_networks" option. You can list any networks there that should be trusted. (You'll need to remake this change on any Zimbra upgrades and you'll need to reload Postfix to make the change live). As for mutt, do you have a non-Zimbra MTA installed on the box (running or not)? If so, it's possible that Mutt tried to use it to send the mail.

    --Will

  3. #3
    Join Date
    Feb 2006
    Location
    brooklyn
    Posts
    25
    Rep Power
    9

    Default

    Quote Originally Posted by wdimmit
    The postfix configuration file (/opt/zimbra/postfix/conf/main.cf) has the "$my_networks" option. You can list any networks there that should be trusted. (You'll need to remake this change on any Zimbra upgrades and you'll need to reload Postfix to make the change live).
    I'd rather not edit a file that's going to get overwritten later. Is there a command to add this change to Zimbra's internal db?

    Quote Originally Posted by wdimmit
    As for mutt, do you have a non-Zimbra MTA installed on the box (running or not)? If so, it's possible that Mutt tried to use it to send the mail.
    I do not have an MTA outside of Zimbra running. AFAIK ZImbra won't start if that is the case, which is why I removed exim. To where does Zimbra's Postfix log? /opt/zimbra/log doesn't have any mail related information.

  4. #4
    Join Date
    Nov 2005
    Posts
    63
    Rep Power
    10

    Default

    Quote Originally Posted by lee
    I do not have an MTA outside of Zimbra running.
    An MTA doesn't have to be running for Mutt to call it. It may be trying to send your message via a /usr/bin/sendmail command.

    Quote Originally Posted by lee
    I'd rather not edit a file that's going to get overwritten later.
    I believe that because the setting is intrinsic to Postfix, you have to make the change in its configuration file directly, as Postfix won't fetch that kind of configuration data from a DB. Assuming that's correct, it'd be nice to be able to make that change perminantly, so you could submit a RFE in Bugzilla.


    --Will

  5. #5
    Join Date
    Feb 2006
    Location
    brooklyn
    Posts
    25
    Rep Power
    9

    Default

    Quote Originally Posted by wdimmit
    An MTA doesn't have to be running for Mutt to call it. It may be trying to send your message via a /usr/bin/sendmail command.
    Ah yes, that appears to be correct. mutt can't even be configured to send it's mail via SMTP. I'm starting a new thread about using /opt/zimbra/postfix/sbin/sendmail as a local MTA. mutt is such a badass MUA!

  6. #6
    Join Date
    Nov 2005
    Posts
    518
    Rep Power
    11

    Default

    edit: check the existing postfix setting and add any other networks to that and set zimbraMtaMyNetworks:
    Code:
    $ postconf mynetworks
    mynetworks = 127.0.0.0/8 192.168.161.0/24
    
    $ zmprov ms SERVERNAME zimbraMtaMyNetworks '127.0.0.0/8 192.168.161.0/24 10.10.130.0/24'

    your sendmail is probably really postfix in disguise, though it is the default postfix and not the zimbra postfix. i'm thinking not much tweaking necessary to make that work.

    zimbra postfix logs in /var/log/zimbra.log
    Last edited by bobby; 12-18-2006 at 02:18 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •