Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I'm new to Postfix and I've had some trouble getting Postfix to relay to relay mail. I've got virtual mailboxes setup using mysql. See main.cf config below: smtpd_sasl_auth_enable = ...
  1. #1
    Just Joined!
    Join Date
    Feb 2008
    Posts
    2

    Postfix help

    Hi,

    I'm new to Postfix and I've had some trouble getting Postfix to relay to relay mail. I've got virtual mailboxes setup using mysql. See main.cf config below:

    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain = <omitted>
    broken_sasl_auth_clients = yes
    smtpd_sasl_exceptions_networks = $mynetworks
    smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject

    virtual_mailbox_domains = mysql:/etc/postfix/mysql-domains.cf
    virtual_mailbox_base = /var/mail/vhosts
    virtual_mailbox_maps = mysql:/etc/postfix/mysql-mailboxes.cf
    virtual_minimum_uid = 100
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    virtual_alias_maps = mysql:/etc/postfix/mysql-aliases.cf


    myhostname = <omitted>
    #alias_maps = hash:/etc/aliases
    #alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = localhost
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all

    ----------------------------------------------------------------

    # telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 <Hostname omitted> ESMTP Postfix (Debian/GNU)
    mail from: test@test.com
    250 2.1.0 Ok
    rcpt to: user@hotmail.com
    550 5.1.1 <user@hotmail.com>: Recipient address rejected: User unknown in virtual mailbox table

    -------------------------------------------------------------

    Since 127.0.0.0/8 is in mynetworks, I should be able to relay mail to any recipient, but I get the error above (basically it gives up after it figures the domain isn't local). Can anyone offer advice for troubleshooting or alternate setup to allow relay from SASL authenticated hosts and mynetworks? Thanks!

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    you could change relayhost =
    to
    relayhost=localhost


    I not sure that would be the best thing to do though. Is this server truly a relay server or is it a final destination for your domain.

  3. #3
    Just Joined!
    Join Date
    Feb 2008
    Posts
    2

    Thanks

    I'm trying to use it as both... a final destination for the virtual domains I host as well as a relay server. Isn't the default for relay server localhost?

  4. #4
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    I generally think of a relay server in 2 ways, one is it sits on the edge of the network accepting incoming mail and relaying it to your internal server, or having your real mail server send all of its outgoing mail to a relay server and then out. I don't think a relay server is typically the final destination for email.

    are there any guides you have been following?

    here are some good links
    Full Mail Server Solution w/ Virtual Domains & Users (Debian Etch, Postfix, Mysql, Dovecot, DSpam, ClamAV, Postgrey, RBL) | HowtoForge - Linux Howtos and Tutorials
    Virtual Users And Domains With Postfix, Courier And MySQL (Debian Etch) | HowtoForge - Linux Howtos and Tutorials
    debian postfix - Google Search

Posting Permissions

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