Setting up aliases and testing in Postfix

I am running Ubuntu 12.04, Postfix, Dovecot.

Everything set up as it should be I think, I have aliases in /etc/aliases and run newaliases:

mailer-daemon: postmaster

postmaster: root

info: mailuser

When I send a test email using mailx to an info@mydomain.com, it goes into a separate mailbox instead of being forwarded into mailuser's box:

mailx info@mycomain.com

However, when I send a test email without the domain, it forwards as it should:

mailx info

Is this a peculuarity of mailx? I have not yet transferred the domain over, I'm trying to make sure email is set up correctly.

What should be in /etc/mailname? foo.mydomain.com or mydomain.com? Right now I have mydomain.com and it seems to be working other than aliases.

My /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 = /usr/share/doc/postfix

# 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 = foo.mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = foo.mydomain.com, localhost, localhost.localdomain
relayhost = 
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
message_size_limit = 30720000
virtual_alias_domains = 
# virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.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
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
# virtual_create_maildirsize = yes
# virtual_maildir_extended = 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
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

Once all this is set up, what do I need to set up as far as the email client? Usual ports (110/25), and mail.mydomain.com or pop.mydomain.com/smtp.mydomain.com? I have no way to test this unless live, and I want to get it working before transferring the domain.

9 Replies

It's not mailx. Since you're using virtual domains/mailboxes, that's what Postfix is referring to when delivering mail to whatever@mydomain.com.

In other words, /etc/aliases only applies to domains listed in mydestination. Since the domain set as myhostname is listed in mydestination, that's where it's ending up.

I don't have any other domains on the Linode (or rather, it will only have the one domain I have not yet transferred). So it sounds like it should be honoring /etc/aliases, but it isn't. Should I also have mydomain.com listed in mydestination like this?

mydestination = foo.mydomain.com, mydomain.com, localhost, localhost.localdomain

What does /var/log/maillog say? It should mention how/why it is routing the message.

There were no errors generated:

Feb 20 20:53:04 foo postfix/pickup[6803]: C866017A6E: uid=0 from= Feb 20 20:53:04 foo postfix/cleanup[6808]: C866017A6E: message-id=<20130221015304.C866017A6E@foo.mydomain.com>

Feb 20 20:53:04 foo postfix/qmgr[6804]: C866017A6E: from=<root@mydomain.com>, size=383, nrcpt=1 (queue active)

Feb 20 20:53:04 foo postfix/pipe[6812]: C866017A6E: to=<sales@mydomain.com>, relay=dovecot, delay=0.04, delays=0.02/0.01/0/0.02, dsn=2.0.0, status=sent (delivered via dovecot service)

Feb 20 20:53:04 foo postfix/qmgr[6804]: C866017A6E: removed

The mail sent to sales did not get aliases, postfix created a mailbox for it.

Maybe a better question would be this:

What is the most basic setup with Postfix (i.e. main.cf configurations) for a Linode with only one domain pointed to it, only one mailbox and several aliases at that single domain pointed to that one mailbox - so maybe mysql is required?

I would prefer a non-mysql setup, using files instead of mysql tables for the "maps", but I plan on using SpamAssassin and SquirrelMail or something similar once I have this working.

I believe I have found the definitive installation guide:

"Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 12.04 LTS)"

http://www.howtoforge.com/virtual-users … -12.04-lts">http://www.howtoforge.com/virtual-users-and-domains-with-postfix-courier-mysql-and-squirrelmail-ubuntu-12.04-lts

I have followed all the way up to (but not yet) installing SquirrelMail, and testing aliases with mailx works! Every single command presented in 5 pages works without errors, simple amazing. Kudos to the author!

Thanks to the above posters for all your help!

Spoke too soon…. after rebooting I cannot get Dovecot to start back up, and I'm getting all sorts of errors. I captured the mail.log just after a reboot:

Feb 22 22:47:54 foo dovecot: master: Fatal: service(pop3) access(/usr/lib/dovecot/pop3) failed: No such file or directory
Feb 22 22:47:55 foo amavis[2178]: starting.  /usr/sbin/amavisd-new at foo.mydomain.com amavisd-new-2.6.5 (20110407), Unicode aware
Feb 22 22:47:55 foo amavis[2178]: Perl version               5.014002
Feb 22 22:47:56 foo amavis[2459]: Net::Server: Group Not Defined.  Defaulting to EGID '120 120'
Feb 22 22:47:56 foo amavis[2459]: Net::Server: User Not Defined.  Defaulting to EUID '112'
Feb 22 22:47:56 foo amavis[2459]: Module Amavis::Conf        2.208
Feb 22 22:47:56 foo amavis[2459]: Module Archive::Zip        1.30
Feb 22 22:47:56 foo amavis[2459]: Module BerkeleyDB          0.49
Feb 22 22:47:56 foo amavis[2459]: Module Compress::Zlib      2.033
Feb 22 22:47:56 foo amavis[2459]: Module Convert::TNEF       0.17
Feb 22 22:47:56 foo amavis[2459]: Module Convert::UUlib      1.4
Feb 22 22:47:56 foo amavis[2459]: Module Crypt::OpenSSL::RSA 0.27
Feb 22 22:47:56 foo amavis[2459]: Module DB_File             1.821
Feb 22 22:47:56 foo amavis[2459]: Module Digest::MD5         2.51
Feb 22 22:47:56 foo amavis[2459]: Module Digest::SHA         5.61
Feb 22 22:47:56 foo amavis[2459]: Module IO::Socket::INET6   2.69
Feb 22 22:47:56 foo amavis[2459]: Module MIME::Entity        5.502
Feb 22 22:47:56 foo amavis[2459]: Module MIME::Parser        5.502
Feb 22 22:47:56 foo amavis[2459]: Module MIME::Tools         5.502
Feb 22 22:47:56 foo amavis[2459]: Module Mail::DKIM::Signer  0.39
Feb 22 22:47:56 foo amavis[2459]: Module Mail::DKIM::Verifier 0.39
Feb 22 22:47:56 foo amavis[2459]: Module Mail::Header        2.08
Feb 22 22:47:56 foo amavis[2459]: Module Mail::Internet      2.08
Feb 22 22:47:56 foo amavis[2459]: Module Mail::SPF           v2.008
Feb 22 22:47:56 foo amavis[2459]: Module Mail::SpamAssassin  3.003002
Feb 22 22:47:56 foo amavis[2459]: Module Net::DNS            0.66
Feb 22 22:47:56 foo amavis[2459]: Module Net::Server         0.99
Feb 22 22:47:56 foo amavis[2459]: Module NetAddr::IP         4.058
Feb 22 22:47:56 foo amavis[2459]: Module Razor2::Client::Version 2.84
Feb 22 22:47:56 foo amavis[2459]: Module Socket6             0.23
Feb 22 22:47:56 foo amavis[2459]: Module Time::HiRes         1.972101
Feb 22 22:47:56 foo amavis[2459]: Module URI                 1.59
Feb 22 22:47:56 foo amavis[2459]: Module Unix::Syslog        1.1
Feb 22 22:47:56 foo amavis[2459]: Amavis::DB code      loaded
Feb 22 22:47:56 foo amavis[2459]: Amavis::Cache code   loaded
Feb 22 22:47:56 foo amavis[2459]: SQL base code        NOT loaded
Feb 22 22:47:56 foo amavis[2459]: SQL::Log code        NOT loaded
Feb 22 22:47:56 foo amavis[2459]: SQL::Quarantine      NOT loaded
Feb 22 22:47:56 foo amavis[2459]: Lookup::SQL code     NOT loaded
Feb 22 22:47:56 foo amavis[2459]: Lookup::LDAP code    NOT loaded
Feb 22 22:47:56 foo amavis[2459]: AM.PDP-in proto code loaded
Feb 22 22:47:56 foo amavis[2459]: SMTP-in proto code   loaded
Feb 22 22:47:56 foo amavis[2459]: Courier proto code   NOT loaded
Feb 22 22:47:56 foo amavis[2459]: SMTP-out proto code  loaded
Feb 22 22:47:56 foo amavis[2459]: Pipe-out proto code  NOT loaded
Feb 22 22:47:56 foo amavis[2459]: BSMTP-out proto code NOT loaded
Feb 22 22:47:56 foo amavis[2459]: Local-out proto code loaded
Feb 22 22:47:56 foo amavis[2459]: OS_Fingerprint code  NOT loaded
Feb 22 22:47:56 foo amavis[2459]: ANTI-VIRUS code      loaded
Feb 22 22:47:56 foo amavis[2459]: ANTI-SPAM code       loaded
Feb 22 22:47:56 foo amavis[2459]: ANTI-SPAM-EXT code   NOT loaded
Feb 22 22:47:56 foo amavis[2459]: ANTI-SPAM-C code     NOT loaded
Feb 22 22:47:56 foo amavis[2459]: ANTI-SPAM-SA code    loaded
Feb 22 22:47:56 foo amavis[2459]: Unpackers code       loaded
Feb 22 22:47:56 foo amavis[2459]: DKIM code            loaded
Feb 22 22:47:56 foo amavis[2459]: Tools code           NOT loaded
Feb 22 22:47:56 foo amavis[2459]: Found $file            at /usr/bin/file
Feb 22 22:47:56 foo amavis[2459]: No $altermime,         not using it
Feb 22 22:47:56 foo amavis[2459]: Internal decoder for .mail
Feb 22 22:47:56 foo amavis[2459]: No decoder for       .F   
Feb 22 22:47:56 foo amavis[2459]: Found decoder for    .Z    at /bin/uncompress
Feb 22 22:47:56 foo amavis[2459]: Internal decoder for .gz  
Feb 22 22:47:56 foo amavis[2459]: Found decoder for    .bz2  at /bin/bzip2 -d
Feb 22 22:47:56 foo amavis[2459]: Found decoder for    .lzo  at /usr/bin/lzop -d
Feb 22 22:47:56 foo amavis[2459]: No decoder for       .rpm  tried: rpm2cpio.pl, rpm2cpio
Feb 22 22:47:56 foo amavis[2459]: Found decoder for    .cpio at /bin/pax
Feb 22 22:47:56 foo amavis[2459]: Found decoder for    .tar  at /bin/pax
Feb 22 22:47:56 foo amavis[2459]: Found decoder for    .deb  at /usr/bin/ar
Feb 22 22:47:56 foo amavis[2459]: Internal decoder for .zip 
Feb 22 22:47:56 foo amavis[2459]: No decoder for       .7z   tried: 7zr, 7za, 7z
Feb 22 22:47:56 foo amavis[2459]: No decoder for       .rar  tried: unrar-free
Feb 22 22:47:56 foo amavis[2459]: No decoder for       .arj  tried: arj, unarj
Feb 22 22:47:56 foo amavis[2459]: Found decoder for    .arc  at /usr/bin/nomarch
Feb 22 22:47:56 foo amavis[2459]: Found decoder for    .zoo  at /usr/bin/zoo
Feb 22 22:47:56 foo amavis[2459]: No decoder for       .lha 
Feb 22 22:47:56 foo amavis[2459]: No decoder for       .doc  tried: ripole
Feb 22 22:47:56 foo amavis[2459]: No decoder for       .cab  tried: cabextract
Feb 22 22:47:56 foo amavis[2459]: No decoder for       .tnef
Feb 22 22:47:56 foo amavis[2459]: Internal decoder for .tnef
Feb 22 22:47:56 foo amavis[2459]: No decoder for       .exe  tried: unrar-free; arj, unarj
Feb 22 22:47:56 foo amavis[2459]: Using primary internal av scanner code for ClamAV-clamd
Feb 22 22:47:56 foo amavis[2459]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
Feb 22 22:47:56 foo amavis[2459]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.49, libdb 5.1
Feb 22 22:48:04 foo authdaemond: modules="authmysql", daemons=5
Feb 22 22:48:04 foo authdaemond: Installing libauthmysql
Feb 22 22:48:04 foo authdaemond: Installation complete: authmysql
Feb 22 22:48:05 foo postfix/master[3114]: daemon started -- version 2.9.3, configuration /etc/postfix
Feb 22 22:48:05 foo postfix/qmgr[3130]: C9A60C0D8: from=<root@mydomain.com>, size=387, nrcpt=1 (queue active)
Feb 22 22:48:05 foo postfix/qmgr[3130]: 5B8DFC0E1: from=<root@mydomain.com>, size=363, nrcpt=1 (queue active)
Feb 22 22:47:30 foo postfix/smtpd[3333]: connect from localhost.localdomain[127.0.0.1]
Feb 22 22:47:30 foo postfix/smtpd[3333]: warning: SASL: Connect to private/auth failed: Connection refused
Feb 22 22:47:30 foo postfix/smtpd[3333]: fatal: no SASL authentication mechanisms
Feb 22 22:47:31 foo postfix/master[3114]: warning: process /usr/lib/postfix/smtpd pid 3333 exit status 1
Feb 22 22:47:31 foo postfix/master[3114]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Feb 22 22:47:31 foo amavis[3324]: (03324-01) (!)FWD via SMTP: <root@mydomain.com>-> <comments@mydomain.com>, 451 4.5.0 From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=03324-01
Feb 22 22:47:31 foo amavis[3324]: (03324-01) Blocked MTA-BLOCKED, <root@mydomain.com>-> <comments@mydomain.com>, Message-ID: <20130222053725.C9A60C0D8@foo.mydomain.com>, mail_id: PAXKMWe6XuEk, Hits: -0.001, size: 387, 3227 ms
Feb 22 22:47:31 foo postfix/smtp[3133]: C9A60C0D8: to=<comments@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=79806, delays=79840/0.04/0/3.2, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=03324-01 - Temporary MTA failure on relaying, From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=03324-01 (in reply to end of DATA command))
Feb 22 22:48:10 foo amavis[3325]: (03325-01) (!)rw_loop: leaving rw loop, no progress, last event (select) 35.035 s ago
Feb 22 22:48:10 foo amavis[3325]: (03325-01) (!)FWD via SMTP: <root@mydomain.com>-> <connie@mydomain.com>, 451 4.5.0 From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=03325-01
Feb 22 22:48:10 foo amavis[3325]: (03325-01) Blocked MTA-BLOCKED, <root@mydomain.com>-> <connie@mydomain.com>, Message-ID: <20130222055315.5B8DFC0E1@foo.mydomain.com>, mail_id: LkQt8+vCdVP6, Hits: -0.001, size: 363, 41287 ms
Feb 22 22:48:10 foo postfix/smtp[3148]: 5B8DFC0E1: to=<connie@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=78895, delays=78890/0.05/0/41, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=03325-01 - Temporary MTA failure on relaying, From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=03325-01 (in reply to end of DATA command))
Feb 22 22:48:15 foo amavis[3325]: (03325-01) (!)rw_loop: leaving rw loop, no progress, last event (select) 5.005 s ago
Feb 22 22:48:31 foo postfix/smtpd[3338]: connect from localhost.localdomain[127.0.0.1]
Feb 22 22:48:31 foo postfix/smtpd[3338]: warning: SASL: Connect to private/auth failed: Connection refused
Feb 22 22:48:31 foo postfix/smtpd[3338]: fatal: no SASL authentication mechanisms
Feb 22 22:48:32 foo postfix/master[3114]: warning: process /usr/lib/postfix/smtpd pid 3338 exit status 1
Feb 22 22:48:32 foo postfix/master[3114]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Feb 22 22:51:36 foo postfix/qmgr[3130]: C9A60C0D8: from=<root@mydomain.com>, size=387, nrcpt=1 (queue active)
Feb 22 22:51:36 foo postfix/qmgr[3130]: 5B8DFC0E1: from=<root@mydomain.com>, size=363, nrcpt=1 (queue active)
Feb 22 22:51:36 foo dccproc[3938]: no DCC answer from dcc1.dcc-servers.net (2001:470:1f05:10ed::29,6277) after 0 ms
Feb 22 22:51:36 foo dccproc[3939]: no DCC answer from dcc2.dcc-servers.net (2001:4978:230::3,6277) after 0 ms
Feb 22 22:51:41 foo postfix/smtpd[3941]: connect from localhost.localdomain[127.0.0.1]
Feb 22 22:51:41 foo postfix/smtpd[3941]: warning: SASL: Connect to private/auth failed: Connection refused
Feb 22 22:51:41 foo postfix/smtpd[3941]: fatal: no SASL authentication mechanisms
Feb 22 22:51:41 foo postfix/smtpd[3944]: connect from localhost.localdomain[127.0.0.1]
Feb 22 22:51:41 foo postfix/smtpd[3944]: warning: SASL: Connect to private/auth failed: Connection refused
Feb 22 22:51:41 foo postfix/smtpd[3944]: fatal: no SASL authentication mechanisms
Feb 22 22:51:42 foo postfix/master[3114]: warning: process /usr/lib/postfix/smtpd pid 3941 exit status 1
Feb 22 22:51:42 foo postfix/master[3114]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Feb 22 22:51:42 foo amavis[3324]: (03324-02) (!)FWD via SMTP: <root@mydomain.com>-> <comments@mydomain.com>, 451 4.5.0 From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=03324-02
Feb 22 22:51:42 foo amavis[3324]: (03324-02) Blocked MTA-BLOCKED, <root@mydomain.com>-> <comments@mydomain.com>, Message-ID: <20130222053725.C9A60C0D8@foo.mydomain.com>, mail_id: 6RaLSFLtgYlp, Hits: -0.001, size: 387, 5911 ms
Feb 22 22:51:42 foo postfix/smtp[3922]: C9A60C0D8: to=<comments@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=80056, delays=80050/0.01/0/5.9, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=03324-02 - Temporary MTA failure on relaying, From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=03324-02 (in reply to end of DATA command))
Feb 22 22:51:42 foo postfix/master[3114]: warning: process /usr/lib/postfix/smtpd pid 3944 exit status 1
Feb 22 22:51:42 foo amavis[3325]: (03325-02) (!)FWD via SMTP: <root@mydomain.com>-> <connie@mydomain.com>, 451 4.5.0 From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=03325-02
Feb 22 22:51:42 foo amavis[3325]: (03325-02) Blocked MTA-BLOCKED, <root@mydomain.com>-> <connie@mydomain.com>, Message-ID: <20130222055315.5B8DFC0E1@foo.mydomain.com>, mail_id: TlP2jYiKZy32, Hits: -0.001, size: 363, 6266 ms
Feb 22 22:51:42 foo postfix/smtp[3924]: 5B8DFC0E1: to=<connie@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=79107, delays=79101/0.01/0/6.3, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=03325-02 - Temporary MTA failure on relaying, From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=03325-02 (in reply to end of DATA command))
Feb 22 23:17:01 foo postfix/pickup[3129]: 434DE17318: uid=0 from= <root>Feb 22 23:17:01 foo postfix/cleanup[4029]: 434DE17318: message-id=<20130223041701.434DE17318@foo.mydomain.com>
Feb 22 23:17:01 foo postfix/qmgr[3130]: 434DE17318: from=<root@mydomain.com>, size=640, nrcpt=1 (queue active)
Feb 22 23:17:09 foo postfix/smtpd[4038]: connect from localhost.localdomain[127.0.0.1]
Feb 22 23:17:09 foo postfix/smtpd[4038]: warning: SASL: Connect to private/auth failed: Connection refused
Feb 22 23:17:09 foo postfix/smtpd[4038]: fatal: no SASL authentication mechanisms
Feb 22 23:17:10 foo postfix/master[3114]: warning: process /usr/lib/postfix/smtpd pid 4038 exit status 1
Feb 22 23:17:10 foo postfix/master[3114]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Feb 22 23:17:10 foo amavis[3324]: (03324-03) (!)FWD via SMTP: <root@mydomain.com>-> <root@mydomain.com>, 451 4.5.0 From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=03324-03
Feb 22 23:17:10 foo amavis[3324]: (03324-03) Blocked MTA-BLOCKED, <root@mydomain.com>-> <root@mydomain.com>, Message-ID: <20130223041701.434DE17318@foo.mydomain.com>, mail_id: rtHqHxEHX2x9, Hits: -0.001, size: 640, 8928 ms
Feb 22 23:17:10 foo postfix/smtp[4033]: 434DE17318: to=<root@mydomain.com>, orig_to=<root>, relay=127.0.0.1[127.0.0.1]:10024, delay=9.1, delays=0.16/0.01/0/8.9, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=03324-03 - Temporary MTA failure on relaying, From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=03324-03 (in reply to end of DATA command))
Feb 22 23:23:05 foo postfix/qmgr[3130]: 434DE17318: from=<root@mydomain.com>, size=640, nrcpt=1 (queue active)
Feb 22 23:23:08 foo postfix/smtpd[4045]: connect from localhost.localdomain[127.0.0.1]
Feb 22 23:23:08 foo postfix/smtpd[4045]: warning: SASL: Connect to private/auth failed: Connection refused
Feb 22 23:23:08 foo postfix/smtpd[4045]: fatal: no SASL authentication mechanisms
Feb 22 23:23:09 foo postfix/master[3114]: warning: process /usr/lib/postfix/smtpd pid 4045 exit status 1
Feb 22 23:23:09 foo postfix/master[3114]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Feb 22 23:23:09 foo amavis[3325]: (03325-03) (!)FWD via SMTP: <root@mydomain.com>-> <root@mydomain.com>, 451 4.5.0 From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=03325-03
Feb 22 23:23:09 foo amavis[3325]: (03325-03) Blocked MTA-BLOCKED, <root@mydomain.com>-> <root@mydomain.com>, Message-ID: <20130223041701.434DE17318@foo.mydomain.com>, mail_id: U3L9sPkegigV, Hits: -0.001, size: 640, 3663 ms
Feb 22 23:23:09 foo postfix/smtp[4040]: 434DE17318: to=<root@mydomain.com>, orig_to=<root>, relay=127.0.0.1[127.0.0.1]:10024, delay=368, delays=364/0.01/0/3.7, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=03325-03 - Temporary MTA failure on relaying, From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=03325-03 (in reply to end of DATA command))
Feb 22 23:29:37 foo dovecot: master: Fatal: service(pop3) access(/usr/lib/dovecot/pop3) failed: No such file or directory
Feb 22 23:29:38 foo amavis[2179]: starting.  /usr/sbin/amavisd-new at foo.mydomain.com amavisd-new-2.6.5 (20110407), Unicode aware
Feb 22 23:29:38 foo amavis[2179]: Perl version               5.014002
Feb 22 23:29:39 foo amavis[2473]: Net::Server: Group Not Defined.  Defaulting to EGID '120 120'
Feb 22 23:29:39 foo amavis[2473]: Net::Server: User Not Defined.  Defaulting to EUID '112'
Feb 22 23:29:39 foo amavis[2473]: Module Amavis::Conf        2.208
Feb 22 23:29:39 foo amavis[2473]: Module Archive::Zip        1.30
Feb 22 23:29:39 foo amavis[2473]: Module BerkeleyDB          0.49
Feb 22 23:29:39 foo amavis[2473]: Module Compress::Zlib      2.033
Feb 22 23:29:39 foo amavis[2473]: Module Convert::TNEF       0.17
Feb 22 23:29:39 foo amavis[2473]: Module Convert::UUlib      1.4
Feb 22 23:29:39 foo amavis[2473]: Module Crypt::OpenSSL::RSA 0.27
Feb 22 23:29:39 foo amavis[2473]: Module DB_File             1.821
Feb 22 23:29:39 foo amavis[2473]: Module Digest::MD5         2.51
Feb 22 23:29:39 foo amavis[2473]: Module Digest::SHA         5.61
Feb 22 23:29:39 foo amavis[2473]: Module IO::Socket::INET6   2.69
Feb 22 23:29:39 foo amavis[2473]: Module MIME::Entity        5.502
Feb 22 23:29:39 foo amavis[2473]: Module MIME::Parser        5.502
Feb 22 23:29:39 foo amavis[2473]: Module MIME::Tools         5.502
Feb 22 23:29:39 foo amavis[2473]: Module Mail::DKIM::Signer  0.39
Feb 22 23:29:39 foo amavis[2473]: Module Mail::DKIM::Verifier 0.39
Feb 22 23:29:39 foo amavis[2473]: Module Mail::Header        2.08
Feb 22 23:29:39 foo amavis[2473]: Module Mail::Internet      2.08
Feb 22 23:29:39 foo amavis[2473]: Module Mail::SPF           v2.008
Feb 22 23:29:39 foo amavis[2473]: Module Mail::SpamAssassin  3.003002
Feb 22 23:29:39 foo amavis[2473]: Module Net::DNS            0.66
Feb 22 23:29:39 foo amavis[2473]: Module Net::Server         0.99
Feb 22 23:29:39 foo amavis[2473]: Module NetAddr::IP         4.058
Feb 22 23:29:39 foo amavis[2473]: Module Razor2::Client::Version 2.84
Feb 22 23:29:39 foo amavis[2473]: Module Socket6             0.23
Feb 22 23:29:39 foo amavis[2473]: Module Time::HiRes         1.972101
Feb 22 23:29:39 foo amavis[2473]: Module URI                 1.59
Feb 22 23:29:39 foo amavis[2473]: Module Unix::Syslog        1.1
Feb 22 23:29:39 foo amavis[2473]: Amavis::DB code      loaded
Feb 22 23:29:39 foo amavis[2473]: Amavis::Cache code   loaded
Feb 22 23:29:39 foo amavis[2473]: SQL base code        NOT loaded
Feb 22 23:29:39 foo amavis[2473]: SQL::Log code        NOT loaded
Feb 22 23:29:39 foo amavis[2473]: SQL::Quarantine      NOT loaded
Feb 22 23:29:39 foo amavis[2473]: Lookup::SQL code     NOT loaded
Feb 22 23:29:39 foo amavis[2473]: Lookup::LDAP code    NOT loaded
Feb 22 23:29:39 foo amavis[2473]: AM.PDP-in proto code loaded
Feb 22 23:29:39 foo amavis[2473]: SMTP-in proto code   loaded
Feb 22 23:29:39 foo amavis[2473]: Courier proto code   NOT loaded
Feb 22 23:29:39 foo amavis[2473]: SMTP-out proto code  loaded
Feb 22 23:29:39 foo amavis[2473]: Pipe-out proto code  NOT loaded
Feb 22 23:29:39 foo amavis[2473]: BSMTP-out proto code NOT loaded
Feb 22 23:29:39 foo amavis[2473]: Local-out proto code loaded
Feb 22 23:29:39 foo amavis[2473]: OS_Fingerprint code  NOT loaded
Feb 22 23:29:39 foo amavis[2473]: ANTI-VIRUS code      loaded
Feb 22 23:29:39 foo amavis[2473]: ANTI-SPAM code       loaded
Feb 22 23:29:39 foo amavis[2473]: ANTI-SPAM-EXT code   NOT loaded
Feb 22 23:29:39 foo amavis[2473]: ANTI-SPAM-C code     NOT loaded
Feb 22 23:29:39 foo amavis[2473]: ANTI-SPAM-SA code    loaded
Feb 22 23:29:39 foo amavis[2473]: Unpackers code       loaded
Feb 22 23:29:39 foo amavis[2473]: DKIM code            loaded
Feb 22 23:29:39 foo amavis[2473]: Tools code           NOT loaded
Feb 22 23:29:39 foo amavis[2473]: Found $file            at /usr/bin/file
Feb 22 23:29:39 foo amavis[2473]: No $altermime,         not using it
Feb 22 23:29:39 foo amavis[2473]: Internal decoder for .mail
Feb 22 23:29:39 foo amavis[2473]: No decoder for       .F   
Feb 22 23:29:39 foo amavis[2473]: Found decoder for    .Z    at /bin/uncompress
Feb 22 23:29:39 foo amavis[2473]: Internal decoder for .gz  
Feb 22 23:29:39 foo amavis[2473]: Found decoder for    .bz2  at /bin/bzip2 -d
Feb 22 23:29:39 foo amavis[2473]: Found decoder for    .lzo  at /usr/bin/lzop -d
Feb 22 23:29:39 foo amavis[2473]: No decoder for       .rpm  tried: rpm2cpio.pl, rpm2cpio
Feb 22 23:29:39 foo amavis[2473]: Found decoder for    .cpio at /bin/pax
Feb 22 23:29:39 foo amavis[2473]: Found decoder for    .tar  at /bin/pax
Feb 22 23:29:39 foo amavis[2473]: Found decoder for    .deb  at /usr/bin/ar
Feb 22 23:29:39 foo amavis[2473]: Internal decoder for .zip 
Feb 22 23:29:39 foo amavis[2473]: No decoder for       .7z   tried: 7zr, 7za, 7z
Feb 22 23:29:39 foo amavis[2473]: No decoder for       .rar  tried: unrar-free
Feb 22 23:29:39 foo amavis[2473]: No decoder for       .arj  tried: arj, unarj
Feb 22 23:29:39 foo amavis[2473]: Found decoder for    .arc  at /usr/bin/nomarch
Feb 22 23:29:39 foo amavis[2473]: Found decoder for    .zoo  at /usr/bin/zoo
Feb 22 23:29:39 foo amavis[2473]: No decoder for       .lha 
Feb 22 23:29:39 foo amavis[2473]: No decoder for       .doc  tried: ripole
Feb 22 23:29:39 foo amavis[2473]: No decoder for       .cab  tried: cabextract
Feb 22 23:29:39 foo amavis[2473]: No decoder for       .tnef
Feb 22 23:29:39 foo amavis[2473]: Internal decoder for .tnef
Feb 22 23:29:39 foo amavis[2473]: No decoder for       .exe  tried: unrar-free; arj, unarj
Feb 22 23:29:39 foo amavis[2473]: Using primary internal av scanner code for ClamAV-clamd
Feb 22 23:29:39 foo amavis[2473]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
Feb 22 23:29:39 foo amavis[2473]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.49, libdb 5.1
Feb 22 23:29:47 foo authdaemond: modules="authmysql", daemons=5
Feb 22 23:29:47 foo authdaemond: Installing libauthmysql
Feb 22 23:29:47 foo authdaemond: Installation complete: authmysql
Feb 22 23:29:05 foo postfix/master[3124]: daemon started -- version 2.9.3, configuration /etc/postfix</root></root@mydomain.com></root@mydomain.com></root@mydomain.com></root@mydomain.com></root@mydomain.com></root@mydomain.com></root></root@mydomain.com></root@mydomain.com></root@mydomain.com></root@mydomain.com></root@mydomain.com></root@mydomain.com></root></connie@mydomain.com></connie@mydomain.com></root@mydomain.com></connie@mydomain.com></root@mydomain.com></comments@mydomain.com></comments@mydomain.com></root@mydomain.com></comments@mydomain.com></root@mydomain.com></root@mydomain.com></root@mydomain.com></connie@mydomain.com></connie@mydomain.com></root@mydomain.com></connie@mydomain.com></root@mydomain.com></comments@mydomain.com></comments@mydomain.com></root@mydomain.com></comments@mydomain.com></root@mydomain.com></root@mydomain.com></root@mydomain.com> 

The interesting bit is the last two lines - 23:29:47 followed by 23:29:05. I read that there is a backwards time bug in Dovecot but don't know if it's related.

This system worked fine (except for SquirrelMail, which had a broken IMAP connection when I tried to login. But running mailx form the shell did exactly what I wanted it to do.

This is extremely frustrating.

Your Dovecot error seems to be:

Feb 22 23:29:37 foo dovecot: master: Fatal: service(pop3) access(/usr/lib/dovecot/pop3) failed: No such file or directory

Somewhere, in Dovecot's configuration, it's referring to a file that doesn't exist.

I must have had Dovecot on the brain… it was left over from an earlier install, and I somehow thought it was needed when ti was not. The installation guide I linked to in my above post uses Courier, not Dovecot. I uninstalled everything mail-related and went through the process again. It works!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct