1

Topic: "SPAM FROM LOCAL" notice received as "Undelivered Mail Returned..."

==== Required information ====
- iRedMail version: iRedAdmin-Pro-MySQL-1.6.0.tar.bz2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6.3
- Related log if you're reporting an issue:
====

Hi.
FYI - I've substituted my actual domain with <mydomain> through this post.

"SPAM FROM LOCAL" notices which should get delivered to root@<mydomain> are being bounced by postfix.
I receive a copy via postmaster@<mydomain> in the form of an  "Undelivered Mail Returned to sender" email.
If I send (from a 3rd party server) an email to either postmaster@<mydomain> or root@<mydomain> I receive them not issue.
Any ideas on how I can resolve this?

On line 362/3 of default config of /etc/amavisd/amavisd.conf, I've change to:
$final_banned_destiny     = D_DISCARD;
$final_spam_destiny       = D_DISCARD;

I have default for:
$policy_bank{'MYUSERS'} = {
    originating => 1,
    allow_disclaimers => 1,
    virus_admin_maps => ["root\@$mydomain"],
    spam_admin_maps  => ["root\@$mydomain"],
    warnbadhsender   => 0,
    smtpd_discard_ehlo_keywords => ['8BITMIME'],
    terminate_dsn_on_notify_success => 0,
};

I have a mailbox josh@<mydomain> with an alias for root and postmast on it.

Postfix maillog shows:
to=<root@<mydomain>>, relay=dovecot, delay=0.12, delays=0.05/0.01/0/0.07, dsn=5.1.1, status=bounced (user unknown)

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: "SPAM FROM LOCAL" notice received as "Undelivered Mail Returned..."

halfbit wrote:

to=<root@<mydomain>>, relay=dovecot, delay=0.12, delays=0.05/0.01/0/0.07, dsn=5.1.1, status=bounced (user unknown)

*) Both Postfix and Dovecot will lookup mail addresses against LDAP/SQL server for local delivery.
*) Plus, Postfix will lookup [system_user_name] from /etc/passwd, but its email address must ends with your server hostname. This is why it says "user unknown".

halfbit wrote:

"SPAM FROM LOCAL" notices which should get delivered to root@<mydomain> are being bounced by postfix.

Please show us full bounce message and/or related log in Postfix log file, we need them for troubleshooting.
I guess what you need is root@<your_server_hostname>, not root@<your_virtual_mail_domain_name>.

3

Re: "SPAM FROM LOCAL" notice received as "Undelivered Mail Returned..."

Full bounce message:
==================
This is the mail system at host example.com

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

<root@example.com>: user unknown

Reporting-MTA: dns; example.com
Original-Envelope-Id: AM..20130607T160411Z@example.com
X-Postfix-Queue-ID: 6816532A4F
X-Postfix-Sender: rfc822; postmaster@example.com
Arrival-Date: Fri,  7 Jun 2013 16:04:11 +0000 (UTC)

Final-Recipient: rfc822; root@example.com
Original-Recipient: rfc822;root@example.com
Action: failed
Status: 5.1.1
Diagnostic-Code: x-unix; user unknown

mailog
=======
Jun  7 12:24:13 example postfix/qmgr[1580]: 3FF4032A2A: removed
Jun  7 12:24:13 example postfix/pipe[13894]: F2E1F32A2B: to=<root@example.com>, relay=dovecot, delay=0.11, delays=0.02/0.04/0/0.05, dsn=5.1.1, status=bounced (user unknown)
Jun  7 12:24:13 example postfix/cleanup[13881]: 1A62132A2C: message-id=<20130607122413.1A62132A2C@example.com>
Jun  7 12:24:13 example postfix/qmgr[1580]: 1A62132A2C: from=<>, size=6570, nrcpt=1 (queue active)
Jun  7 12:24:13 example postfix/trivial-rewrite[13892]: warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains
Jun  7 12:24:13 example postfix/bounce[13896]: F2E1F32A2B: sender non-delivery notification: 1A62132A2C
Jun  7 12:24:13 example postfix/qmgr[1580]: F2E1F32A2B: removed
Jun  7 12:24:13 example postfix/pipe[13894]: 1A62132A2C: to=<josh@example.com>, relay=dovecot, delay=0.08, delays=0.01/0/0/0.07, dsn=2.0.0, status=sent (delivered via dovecot service)
Jun  7 12:24:13 example postfix/qmgr[1580]: 1A62132A2C: removed

4

Re: "SPAM FROM LOCAL" notice received as "Undelivered Mail Returned..."

Again, Postfix will lookup [system_user_name] from /etc/passwd, but its email address must ends with your server hostname. This is why it says "user unknown".

5

Re: "SPAM FROM LOCAL" notice received as "Undelivered Mail Returned..."

Sorry, but if the hostname is example.com, and I have an alias on josh@example.com for root@example.com, why is the user unknown? Is it because it's using the short hostname (i.e. "example", rather than "example.com")?
hostname -f  ==> example.com
hostname -s ==> example

6

Re: "SPAM FROM LOCAL" notice received as "Undelivered Mail Returned..."

Sorry if this is my lack of understanding - but could you please let me know how I can go about correcting this issue?

7

Re: "SPAM FROM LOCAL" notice received as "Undelivered Mail Returned..."

I personally do not rely on the local aliases at all - so I would suggest to create the mailbox root@example.com (or alias it to existing account)