Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail -Ubuntu 8.04

Discussion in 'HOWTO-Related Questions' started by c4rdinal, May 27, 2008.

  1. burnclouds

    burnclouds New Member

    Spamdam

    Does anyone know how to get spamdam to work with this setup?
    Or is there another (squirrelmail?) user interface to allow users to add there own aliases (disposable e-mail address)?

    Spamdam:
    http://sourceforge.net/projects/spamdam/
     
  2. falko

    falko Super Moderator Howtoforge Staff

    I've never tried SpamDam...
     
  3. Nehalem

    Nehalem New Member

    setup problem

    Hi

    First of all, thank you for your great tutorial. It really saved me a lot of time.
    I have one problem though. I cannot send emails via Outlook.

    This IS working

    - i can send emails via squirrel
    - i can receive emails via squirrel
    - i can receive emails via outlook

    but i cannot send emails via outlook

    -outlook is configured to use the same username and password as for receiving emails
    -Port in use for smtp is 25

    cat /var/log/mail.log:

    Code:
    Nov 24 13:09:36 NbI20841-01 postfix/smtpd[19830]: warning: XXXX: SASL LOGIN authentication failed: authentication failure
    Nov 24 13:09:36 YYYYY postfix/smtpd[19830]: lost connection after AUTH from XXXXXX
    Nov 24 13:09:36 YYYYYY postfix/smtpd[19830]: disconnect from XXXXX.
    I've restarted all auth daemons mentioned in the tutorial, but the problems seems to persist.

    cat /etc/pam.d/smtp:

    Code:
    auth    required   pam_mysql.so user=mail_admin passwd=mail_admin_password host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
    account sufficient pam_mysql.so user=mail_admin passwd=mail_admin_password host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
    
    cat /etc/default/saslauthd
    Code:
    #
    # Settings for saslauthd daemon
    # Please read /usr/share/doc/sasl2-bin/README.Debian for details.
    #
    
    # Should saslauthd run automatically on startup? (default: no)
    START=yes
    
    # Description of this saslauthd instance. Recommended.
    # (suggestion: SASL Authentication Daemon)
    DESC="SASL Authentication Daemon"
    
    # Short name of this saslauthd instance. Strongly recommended.
    # (suggestion: saslauthd)
    NAME="saslauthd"
    
    # Which authentication mechanisms should saslauthd use? (default: pam)
    #
    # Available options in this Debian package:
    # getpwent  -- use the getpwent() library function
    # kerberos5 -- use Kerberos 5
    # pam       -- use PAM
    # rimap     -- use a remote IMAP server
    # shadow    -- use the local shadow password file
    # sasldb    -- use the local sasldb database file
    # ldap      -- use LDAP (configuration is in /etc/saslauthd.conf)
    #
    # Only one option may be used at a time. See the saslauthd man page
    # for more information.
    #
    # Example: MECHANISMS="pam"
    MECHANISMS="pam"
    
    # Additional options for this mechanism. (default: none)
    # See the saslauthd man page for information about mech-specific options.
    MECH_OPTIONS=""
    
    # How many saslauthd processes should we run? (default: 5)
    # A value of 0 will fork a new process for each connection.
    THREADS=5
    
    # Other options (default: -c -m /var/run/saslauthd)
    # Note: You MUST specify the -m option or saslauthd won't run!
    #
    # See /usr/share/doc/sasl2-bin/README.Debian for Debian-specific information.
    # See the saslauthd man page for general information about these options.
    #
    # Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
    #OPTIONS="-c -m /var/run/saslauthd"
    OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
    
    cat /etc/postfix/sasl/smtpd.conf

    Code:
    pwcheck_method: saslauthd
    mech_list: plain login
    allow_plaintext: true
    auxprop_plugin: mysql
    sql_hostnames: 127.0.0.1
    sql_user: mail_admin
    sql_passwd: mail_admin_password
    sql_database: mail
    sql_select: select password from users where email = '%u'
    
    netstat -tpa
    Code:
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:https                 *:*                     LISTEN      31857/apache2
    tcp        0      0 *:51234                 *:*                     LISTEN      24366/server_linux
    tcp        0      0 *:14534                 *:*                     LISTEN      24366/server_linux
    tcp        0      0 localhost.localdo:10024 *:*                     LISTEN      7573/amavisd (maste
    tcp        0      0 localhost.localdo:10025 *:*                     LISTEN      18141/master
    tcp        0      0 localhost.localdo:mysql *:*                     LISTEN      21638/mysqld
    tcp        0      0 *:www                   *:*                     LISTEN      31857/apache2
    tcp        0      0 *:smtp                  *:*                     LISTEN      18141/master
    tcp6       0      0 [::]:imaps              [::]:*                  LISTEN      18409/couriertcpd
    tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      19502/couriertcpd
    tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      19465/couriertcpd
    tcp6       0      0 [::]:imap2              [::]:*                  LISTEN      18372/couriertcpd
    tcp6       0      0 [::]:ftp                [::]:*                  LISTEN      25846/proftpd: (acc
    tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      14038/sshd
    tcp6       0      0 [::]:smtp               [::]:*                  LISTEN      18141/master
    
    Thanks for your help in advance

    N.
     
    Last edited: Nov 24, 2008
  4. falko

    falko Super Moderator Howtoforge Staff

    Did you disable AppArmor?

    Did you run this command?
    Code:
    adduser postfix sasl
     
  5. Nehalem

    Nehalem New Member

    Code:
    adduser postfix sasl
    
    results in The user `postfix' is already a member of `sasl'.

    I have disabled, apparmor. Yes.
     
  6. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ps aux|grep saslauthd
    ?
    What's in /etc/postfix/main.cf?
     
  7. Nehalem

    Nehalem New Member

    ps aux | grep saslauthd

    Code:
    root@NbI20841-01:~# ps aux | grep saslauthd
    root      5211  0.0  0.0   1700   504 pts/1    S+   17:24   0:00 grep saslauthd
    root      9266  0.0  0.1   7776  1068 ?        Ss   Nov25   0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
    root      9267  0.0  0.1   7776  1040 ?        S    Nov25   0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
    root      9268  0.0  0.0   7776   356 ?        S    Nov25   0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
    root      9269  0.0  0.0   7776   356 ?        S    Nov25   0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
    root      9270  0.0  0.0   7776   356 ?        S    Nov25   0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
    
    cat /etc/postfix/main.cf

    Code:
    root@NbI20841-01:~# cat /etc/postfix/main.cf
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    readme_directory = no
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    myhostname = NbI20841-01.NbIServ.de
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = NbI20841-01.NbIServ.de, localhost, localhost.localdomain
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command =
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    inet_protocols = all
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    home_mailbox = Maildir/
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /home/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_create_maildirsize = yes
    virtual_mailbox_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Looks ok. Did you double-check your Outlook settings?

    Are there any other errors in your mail log?
     
  9. Nehalem

    Nehalem New Member

    I checked the "use same username / password " box. so I assume there is no typo, because I can receive emails without problems.
    I use only the ip of my server for the server field in the options.
    pop3 port is 110; smtp: 25

    If I do not enter login details, then I receive a relay access denied mail.

    Would you suggest some string to grep for ? Beside the login failure i cannot find any obvious entries


    -------------
    full entry of mail.log after unsuccessfully trying to send:

    Code:
    Nov 27 18:11:26 NbI20841-01 postfix/smtpd[22493]: warning: unknown[<IP>]: SASL LOGIN authentication failed: authentication failure
    Nov 27 18:11:26 NbI20841-01 postfix/smtpd[22493]: lost connection after AUTH from unknown[<IP>]
    Nov 27 18:11:26 NbI20841-01 postfix/smtpd[22493]: disconnect from unknown[<IP>]
    
     
    Last edited: Nov 27, 2008
  10. falko

    falko Super Moderator Howtoforge Staff

    I'm not sure what's wrong. I'd compare your configuration files with the ones from the tutorial again - maybe you made a typo somewhere?
     
  11. Nehalem

    Nehalem New Member

    I have just figured out what went wrong with help by a friend of mine.

    libpam-mysql was not installed.

    Maybe I missed it in your tutorial, I don't know. Now it works perfectly well
    Thanks for your support
     
  12. rule3

    rule3 New Member

    I am trying to install this whole thing to Ubuntu 8.10

    At the moment that is not work is:

    /home/vmail/

    MTA whatever not make domain folders or even user folders..


    mail.info

    Code:
    Dec 21 23:28:32 server amavis[4283]: (04283-02) (!)rw_loop: leaving rw loop, no progress
    Dec 21 23:28:32 server amavis[4283]: (04283-02) Negative SMTP resp. to DATA: 
    Dec 21 23:28:32 server amavis[4283]: (04283-02) (!)FWD via SMTP: <[email protected]> -> <[email protected]>,BODY=7BIT 451 4.5.0 No resp. to MAIL FROM, id=04283-02, from MTA([127.0.0.1]:10025): 
    Dec 21 23:28:32 server amavis[4283]: (04283-02) Blocked MTA-BLOCKED, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: mtem81lxOSi7, Hits: -0.001, size: 358, 539499 ms
    Dec 21 23:28:32 server postfix/smtp[10579]: A3E214FB3DC: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=14603, delays=14064/0.01/0/539, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 No resp. to MAIL FROM, id=04283-02, from MTA([127.0.0.1]:10025):  (in reply to end of DATA command))
    Dec 21 23:28:32 server postfix/smtp[10579]: connect to sever.domain.tld[232.56.78.21]:10024: Connection refused
    Dec 21 23:28:32 server postfix/smtp[10579]: 4197B4FB3E3: to=<[email protected]>, relay=none, delay=12013, delays=11773/240/0/0, dsn=4.4.1, status=deferred (connect to sever.domain.tld[232.56.78.21]:10024: Connection refused)
    Dec 21 23:28:32 server amavis[4284]: (04284-02) (!)rw_loop: leaving rw loop, no progress
    Dec 21 23:28:32 server amavis[4284]: (04284-02) Negative SMTP resp. to DATA: 
    Dec 21 23:28:32 server amavis[4284]: (04284-02) (!)FWD via SMTP: <[email protected]> -> <[email protected]>,BODY=7BIT 451 4.5.0 No resp. to MAIL FROM, id=04284-02, from MTA([127.0.0.1]:10025): 
    Dec 21 23:28:32 server amavis[4284]: (04284-02) Blocked MTA-BLOCKED, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: ToQO9X9jEluN, Hits: -0.001, size: 362, 540330 ms
    Dec 21 23:28:32 server postfix/smtp[10580]: E38E84FB3E1: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=13375, delays=12835/0.01/0/540, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 No resp. to MAIL FROM, id=04284-02, from MTA([127.0.0.1]:10025):  (in reply to end of DATA command))
    Dec 21 23:28:49 server postfix/proxymap[10591]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
    Dec 21 23:28:49 server postfix/proxymap[10591]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
    Dec 21 23:28:49 server postfix/trivial-rewrite[11201]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 21 23:28:49 server postfix/trivial-rewrite[11202]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 21 23:28:49 server postfix/trivial-rewrite[11203]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    
    Dec 22 00:25:19 server postfix/proxymap[2510]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
    Dec 22 00:25:19 server postfix/proxymap[2510]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
    Dec 22 00:25:19 server postfix/trivial-rewrite[4182]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:25:19 server postfix/trivial-rewrite[4183]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:25:19 server postfix/trivial-rewrite[4184]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:25:19 server postfix/trivial-rewrite[4185]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:25:19 server postfix/trivial-rewrite[4186]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:25:19 server postfix/trivial-rewrite[4187]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:25:19 server postfix/trivial-rewrite[4188]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:25:19 server postfix/trivial-rewrite[4189]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:25:19 server postfix/trivial-rewrite[4191]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:25:19 server postfix/trivial-rewrite[4190]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:25:19 server postfix/trivial-rewrite[4192]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    
    mail.err

    Code:
    
    Dec 22 00:27:21 server postfix/trivial-rewrite[4212]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:27:21 server postfix/trivial-rewrite[4213]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:27:21 server postfix/trivial-rewrite[4214]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:28:22 server postfix/trivial-rewrite[4215]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:28:22 server postfix/trivial-rewrite[4216]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:28:22 server postfix/trivial-rewrite[4217]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:28:22 server postfix/trivial-rewrite[4219]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:28:22 server postfix/trivial-rewrite[4218]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:28:22 server postfix/trivial-rewrite[4220]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:28:22 server postfix/trivial-rewrite[4221]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:28:22 server postfix/trivial-rewrite[4222]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:28:22 server postfix/trivial-rewrite[4224]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:28:22 server postfix/trivial-rewrite[4223]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Dec 22 00:28:22 server postfix/trivial-rewrite[4225]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    
    I am tested everything a hours but I don't find a issue..

    Courier seams to transfert email to Thunderbird is I making mail dir manually and then place come .txt file to new dir...

    So there is some errors to connect Db..
    fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem

    And this

    forge amavis[4284]: (04284-02) Blocked MTA-BLOCKED, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: ToQO9X9jEluN, Hits: -0.001, size: 362, 540330 ms

    Btw, I did not do everythig similar in HowTo and not going to do because I can not really change mysql bind-address to 127.0.0.1

    Every other mysql connections works..
     
    Last edited: Dec 22, 2008
  13. rule3

    rule3 New Member

    Hi, I edited all, mysql host setings to localhost instead 127.0.0.1...

    Now there is a line

    Code:
    Dec 22 01:43:19 server postfix/smtpd[5526]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    Dec 22 01:40:51 server postfix/cleanup[5529]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    Dec 22 01:40:51 server postfix/cleanup[5529]: warning: D7E5F4FB3E7: virtual_alias_maps map lookup problem for [email protected]
    
    
    No other MySQL connect errors..

    So... some functions of postfix tries to use socket.. instead TCP/IP connection.. my server is confed to use MySQL bind-address for external use if domain is in MySQL user's host.
    And that setting can not be or I can not go to change..

    MTA do not get needed information to transfert mail to /var/vmail/sever.doamin.tld/testmail ...

    And when this is fixed there will be a next issue..
     
    Last edited: Dec 22, 2008
  14. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/postfix/mysql-virtual_domains.cf?
     
  15. rule3

    rule3 New Member

    Code:
    user = mail_admin
    password = mail_admin_password
    dbname = mail
    query = SELECT domain AS virtual FROM domains WHERE domain='%s'
    hosts = localhost
    
    mail_admin_password is same in other files and removed from this reply
     
  16. rule3

    rule3 New Member

    Hi,

    I changed all hosts for MySQL to serve.domain.tld and allowed user access with domain serve.domain.tld

    No MySQL-errors anymore..

    I get bumerang mail.. when I tru to sent mail to my test address..

    <[email protected]>: mail for
    server.domain.tld loops back to myself


    In logs email is removed by some reason "mail for
    server.domain.tld loops back to myself"


    And yes in transtport table we have
    domain: server.domain.tld
    transport: smtp:server.domain.tld

    Code:
    Dec 22 14:57:43 server postfix/smtpd[16274]: connect from emh06.mail.isp.tld[34.78.6.111]
    Dec 22 14:57:43 server postfix/smtpd[16274]: 2D3AE4FB3D5: client=emh06.mail.isp.tld[34.78.6.111]
    Dec 22 14:57:43 server postfix/cleanup[16279]: 2D3AE4FB3D5: message-id=<[email protected]>
    Dec 22 14:57:43 server postfix/qmgr[16263]: 2D3AE4FB3D5: from=<[email protected]>, size=1642, nrcpt=1 (queue active)
    Dec 22 14:57:43 server postfix/smtpd[16274]: disconnect from emh06.mail.isp.tld[34.78.6.111]
    Dec 22 14:57:45 server postfix/smtpd[16286]: connect from localhost[127.0.0.1]
    Dec 22 14:57:45 server postfix/smtpd[16286]: BB3174FB3FF: client=localhost[127.0.0.1]
    Dec 22 14:57:45 server postfix/cleanup[16279]: BB3174FB3FF: message-id=<[email protected]>
    Dec 22 14:57:45 server postfix/qmgr[16263]: BB3174FB3FF: from=<[email protected]>, size=2181, nrcpt=1 (queue active)
    Dec 22 14:57:45 server postfix/trivial-rewrite[16366]: warning: do not list domain server.domain.tld in BOTH mydestination and virtual_mailbox_domains
    Dec 22 14:57:45 server postfix/smtpd[16286]: disconnect from localhost[127.0.0.1]
    Dec 22 14:57:45 server amavis[13303]: (13303-10) Passed CLEAN, [34.78.6.111] [11.11.11.23] <[email protected]> -> <[email protected], Message-ID: <[email protected]>, mail_id: u-TE8m2RH+wi, Hits: 0, size: 1642, queued_as: BB3174FB3FF, 2571 ms
    Dec 22 14:57:45 server postfix/smtp[16280]: 2D3AE4FB3D5: to=<[email protected], relay=127.0.0.1[127.0.0.1]:10024, delay=2.6, delays=0.05/0/0/2.6, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=13303-10, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as BB3174FB3FF)
    Dec 22 14:57:45 server postfix/qmgr[16263]: 2D3AE4FB3D5: removed
    Dec 22 14:57:45 server postfix/smtp[16287]: BB3174FB3FF: to=<[email protected], relay=none, delay=0.01, delays=0.01/0/0/0, dsn=5.4.6, status=bounced (mail for server.domain.tld loops back to myself)
    Dec 22 14:57:45 server postfix/cleanup[16279]: C39F64FB3D5: message-id=<[email protected]
    Dec 22 14:57:45 server postfix/qmgr[16263]: C39F64FB3D5: from=<>, size=4302, nrcpt=1 (queue active)
    Dec 22 14:57:45 server postfix/bounce[16308]: BB3174FB3FF: sender non-delivery notification: C39F64FB3D5
    Dec 22 14:57:45 server postfix/qmgr[16263]: BB3174FB3FF: removed
    Dec 22 14:57:45 server postfix/smtp[16287]: C39F64FB3D5: to=<[email protected]>, relay=mail.domain.tld[194.79.16.40]:25, delay=0.13, delays=0.01/0/0.01/0.11, dsn=2.0.0, status=sent (250 ok 1229957865 qp 15717)
    Dec 22 14:57:45 server postfix/qmgr[16263]: C39F64FB3D5: removed
    
    And on testmail folder haves now a courierpop3dsizelist

    Content:

    /2 3 1229904926
    somecofigureddomain.domaid.tld:2, 3686 2:1229904926

    And that domain fo not belongs to whole thing..
     
    Last edited: Dec 22, 2008
  17. rule3

    rule3 New Member

    I got everytihng to work..

    Issue was simple:

    Just forget the 127.0.0.1 host and use yourserver.domain.tld for MySQL and make MySQL user with that host

    Plese be sure you can not use emails like [email protected] use emails like [email protected]
    Wathever other... is confed to your sever at some DNS.. in fact you can not use emails with that address which is your SMTP/POP/IMAP host.. so use some other domain.
     
    Last edited: Dec 23, 2008
  18. rule3

    rule3 New Member

    ...

    Finally I got it work but sometimes mail server not response
     
    Last edited: Dec 31, 2008
  19. klangen

    klangen New Member

    Problem with domain alias.

    Thanks for a really good guide. Really helped me alot!

    I do have one problem though.

    I can't get the domain forwards to work (@example.com > @anotherdomain.tld).
    All the other forwards work (catch all etc).
    Anyone else have this problem?
     
  20. falko

    falko Super Moderator Howtoforge Staff

    Any errors in your mail log?
     

Share This Page