Postfix problem: canonical maps - Resolved

I’m not able to receive mail to a valid recipient. The log entries from /var/logs/maillog are below. I remember that when I first set this up I had an error about no canonical maps and set it to ‘hash:/etc/postfix/virtual’ for address mapping, recipient name and sender name lookups.

How can I correct whatever is wrong?

thanks,
tony

[code:1]
Nov 17 13:09:23 linux1 dovecot: imap-login: Login: user=<ezms>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Nov 17 13:09:23 linux1 dovecot: IMAP(ezms): Disconnected: Logged out
Nov 17 13:10:01 linux1 postfix/smtpd[29485]: connect from sterling-imail2.sterlink.net[199.108.225.98]
Nov 17 13:10:01 linux1 postfix/smtpd[29485]: 46F9E2C600F3: client=sterling-imail2.sterlink.net[199.108.225.98]
Nov 17 13:10:01 linux1 postfix/cleanup[29489]: warning: 46F9E2C600F3: unreasonable recipient_canonical_maps map nesting for ezms@ez-ms.com
Nov 17 13:10:01 linux1 postfix/cleanup[29489]: warning: 46F9E2C600F3: unreasonable canonical_maps map nesting for ezms@ez-ms.com
Nov 17 13:10:01 linux1 postfix/cleanup[29489]: warning: 46F9E2C600F3: unreasonable virtual_alias_maps map nesting for ezms@ez-ms.com
Nov 17 13:10:01 linux1 postfix/cleanup[29489]: 46F9E2C600F3: message-id=<200811171308114.SM02332@truth>
Nov 17 13:10:01 linux1 postfix/qmgr[2341]: 46F9E2C600F3: from=<tonyb@1sit.com>, size=2207, nrcpt=1 (queue active)
Nov 17 13:10:01 linux1 postfix/smtpd[29485]: disconnect from sterling-imail2.sterlink.net[199.108.225.98]
[/code:1]<br><br>Post edited by: tbirnseth, at: 2008/11/20 07:49

Okay, so it looks like ezms is your login name – then as you said, it looks like there might be a loop in the virtual file. The following line may be the culprit:

ezms ezms@ez-ms.com

In Virtualmin, click Webmin -> Servers -> Postfix Mail Server -> Virtual Domains – then look for the section with "ezms" maps to "ezms@ez-ms.com" and delete it.

Make sure to save/apply the changes, and then try sending another message to that account.
-Eric

That seems to have fixed the delivery issue! Thanks so much!

However, in looking at the maillog, it appears that spamd is not talking to postfix.

[code:1]
Nov 18 00:01:04 linux1 postfix/anvil[13257]: statistics: max cache size 1 at Nov 17 23:57:40
Nov 18 01:15:53 linux1 postfix/postfix-script[15283]: refreshing the Postfix mail system
Nov 18 01:15:53 linux1 postfix/master[3981]: reload configuration /etc/postfix
Nov 18 01:16:07 linux1 postfix/postfix-script[15445]: refreshing the Postfix mail system
Nov 18 01:16:07 linux1 postfix/master[3981]: reload configuration /etc/postfix
Nov 18 01:16:57 linux1 postfix/smtpd[15507]: connect from sterling-imail2.sterlink.net[199.108.225.98]
Nov 18 01:16:57 linux1 postfix/smtpd[15507]: 34DCD2C600F3: client=sterling-imail2.sterlink.net[199.108.225.98]
Nov 18 01:16:57 linux1 postfix/cleanup[15511]: 34DCD2C600F3: message-id=<200811180114713.SM02344@truth>
Nov 18 01:16:57 linux1 postfix/qmgr[15449]: 34DCD2C600F3: from=<tonyb@1sit.com>, size=2156, nrcpt=1 (queue active)
Nov 18 01:16:57 linux1 postfix/smtpd[15507]: disconnect from sterling-imail2.sterlink.net[199.108.225.98]
Nov 18 01:17:00 linux1 spamc[15526]: connect to spamd on 127.0.0.1 failed, retrying (#1 of 3): Connection refused
Nov 18 01:17:01 linux1 spamc[15526]: connect to spamd on 127.0.0.1 failed, retrying (#2 of 3): Connection refused
Nov 18 01:17:02 linux1 spamc[15526]: connect to spamd on 127.0.0.1 failed, retrying (#3 of 3): Connection refused
Nov 18 01:17:03 linux1 spamc[15526]: connection attempt to spamd aborted after 3 retries
Nov 18 01:17:03 linux1 postfix/local[15512]: 34DCD2C600F3: to=<ezms@linux1.ez-merchant-hosting.com>, orig_to=<ezms@ez-ms.com>, relay=local, delay=6.4, delays=0.25/0.06/0/6.1, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Nov 18 01:17:03 linux1 postfix/qmgr[15449]: 34DCD2C600F3: removed
[/code:1]

Indeed, good catch :slight_smile:

Is Spamassassin currently running?

Try typing:

/etc/init.d/spamassassin restart

If it had died, or otherwise not been started, that could cause the error you’re seeing.
-Eric

That seemed to do it. So I guess the question is why wasn’t it running? Does VM restart it or anything during creation of a new server? I note in the log file that when it started up and got email for this domain that it created a preferences file for the user.

Shouldn’t VM ensure that it’s running as part of server creation?

tony

I can’t really speak to why it wasn’t running a moment ago – but what I’d do is just verify that it’s setup to launch upon system bootup.

To do that, log into Virtualmin, then click Webmin -> System -> Bootup and Shutdown, and make sure Spamassassin’s “At boot” flag is set to “yes”.
-Eric

Okay, the spamd/spamassassin daemons were not set to start at boot time. I’d assume that webmin’s default is to start them and I don’t recall ever going to that page before. So I have no idea how/why they got turned off.

Thanks again… I’m actually making progress! :slight_smile:

tony

And the /etc/postfix/virtual items are (minus the big header):

[code:1]
ez-merchant-solutions ez-merchant-solutions@ez-merchant-solutions.com
ezms ezms@ez-ms.com
admin_ez-ms admin_ez-ms@ez-ms.com
${prefix} ${prefix}@test.com
test@test.ez-ms.com test
hostmaster@test.ez-ms.com test@test.com
postmaster@test.ez-ms.com test@test.com
abuse@test.ez-ms.com test@test.com
ezms@ez-ms.com ezms
ez-ms.com ez-ms.com
info@ez-ms.com ezms@ez-ms.com
hostmaster@ez-ms.com ezms@ez-ms.com
postmaster@ez-ms.com ezms@ez-ms.com
abuse@ez-ms.com ezms@ez-ms.com
webmaster@ez-ms.com ezms@ez-ms.com
support@ez-ms.com ezms@ez-ms.com
webmaster@test.ez-ms.com test@test.com
root.com@root.com root.com
root.com root.com
abuse@root.com tonyb@1sit.com
postmaster@root.com tonyb@1sit.com
hostmaster@root.com tonyb@1sit.com
webmaster@root.com tonyb@1sit.com
@root.com tonyb@1sit.com
test@test.com test
test test@test.com
test.com test.com
abuse@test.com test@test.com
postmaster@test.com test@test.com
webmaster@test.com test@test.com
hostmaster@test.com test@test.com
support@test.com test@test.com
info@test.com test@test.com
test.ez-ms.com test.ez-ms.com
info@test.ez-ms.com test@test.com
support@test.ez-ms.com test@test.com
ezom@ez-om.com ezom
ezom ezom@ez-om.com
ez-om.com ez-om.com
abuse@ez-om.com ezom@ez-om.com
webmaster@ez-om.com ezom@ez-om.com
postmaster@ez-om.com ezom@ez-om.com
hostmaster@ez-om.com ezom@ez-om.com

[/code:1]

And the /etc/postfix/virtual items are (minus the big header):

[code:1]
ez-merchant-solutions ez-merchant-solutions@ez-merchant-solutions.com
ezms ezms@ez-ms.com
admin_ez-ms admin_ez-ms@ez-ms.com
${prefix} ${prefix}@test.com
test@test.ez-ms.com test
hostmaster@test.ez-ms.com test@test.com
postmaster@test.ez-ms.com test@test.com
abuse@test.ez-ms.com test@test.com
ezms@ez-ms.com ezms
ez-ms.com ez-ms.com
info@ez-ms.com ezms@ez-ms.com
hostmaster@ez-ms.com ezms@ez-ms.com
postmaster@ez-ms.com ezms@ez-ms.com
abuse@ez-ms.com ezms@ez-ms.com
webmaster@ez-ms.com ezms@ez-ms.com
support@ez-ms.com ezms@ez-ms.com
webmaster@test.ez-ms.com test@test.com
root.com@root.com root.com
root.com root.com
abuse@root.com tonyb@1sit.com
postmaster@root.com tonyb@1sit.com
hostmaster@root.com tonyb@1sit.com
webmaster@root.com tonyb@1sit.com
@root.com tonyb@1sit.com
test@test.com test
test test@test.com
test.com test.com
abuse@test.com test@test.com
postmaster@test.com test@test.com
webmaster@test.com test@test.com
hostmaster@test.com test@test.com
support@test.com test@test.com
info@test.com test@test.com
test.ez-ms.com test.ez-ms.com
info@test.ez-ms.com test@test.com
support@test.ez-ms.com test@test.com
ezom@ez-om.com ezom
ezom ezom@ez-om.com
ez-om.com ez-om.com
abuse@ez-om.com ezom@ez-om.com
webmaster@ez-om.com ezom@ez-om.com
postmaster@ez-om.com ezom@ez-om.com
hostmaster@ez-om.com ezom@ez-om.com

[/code:1]

And the /etc/postfix/virtual items are (minus the big header):

[code:1]
ez-merchant-solutions ez-merchant-solutions@ez-merchant-solutions.com
ezms ezms@ez-ms.com
admin_ez-ms admin_ez-ms@ez-ms.com
${prefix} ${prefix}@test.com
test@test.ez-ms.com test
hostmaster@test.ez-ms.com test@test.com
postmaster@test.ez-ms.com test@test.com
abuse@test.ez-ms.com test@test.com
ezms@ez-ms.com ezms
ez-ms.com ez-ms.com
info@ez-ms.com ezms@ez-ms.com
hostmaster@ez-ms.com ezms@ez-ms.com
postmaster@ez-ms.com ezms@ez-ms.com
abuse@ez-ms.com ezms@ez-ms.com
webmaster@ez-ms.com ezms@ez-ms.com
support@ez-ms.com ezms@ez-ms.com
webmaster@test.ez-ms.com test@test.com
root.com@root.com root.com
root.com root.com
abuse@root.com tonyb@1sit.com
postmaster@root.com tonyb@1sit.com
hostmaster@root.com tonyb@1sit.com
webmaster@root.com tonyb@1sit.com
@root.com tonyb@1sit.com
test@test.com test
test test@test.com
test.com test.com
abuse@test.com test@test.com
postmaster@test.com test@test.com
webmaster@test.com test@test.com
hostmaster@test.com test@test.com
support@test.com test@test.com
info@test.com test@test.com
test.ez-ms.com test.ez-ms.com
info@test.ez-ms.com test@test.com
support@test.ez-ms.com test@test.com
ezom@ez-om.com ezom
ezom ezom@ez-om.com
ez-om.com ez-om.com
abuse@ez-om.com ezom@ez-om.com
webmaster@ez-om.com ezom@ez-om.com
postmaster@ez-om.com ezom@ez-om.com
hostmaster@ez-om.com ezom@ez-om.com

[/code:1]