[Mailman-Users] non-delivery to virtual domain

David Newman dnewman at networktest.com
Wed Nov 3 19:03:36 CET 2010


On 11/2/10 8:13 AM, Mark Sapiro wrote:
> David Newman wrote:
> 
>> On 10/31/10 10:22 PM, Mark Sapiro wrote:
>>> On 10/31/10 4:56 PM, David Newman wrote:
>>>> On 10/31/10 9:09 AM, Mark Sapiro wrote:
>>>>>
>>>>> [...]
>>
>> Here's a log snapshot of a message sent to s at domain1.tld, a Mailman list
>> with subscribers 'dnewman at networktest.com' and 'dnewman at domain1.tld'.
>>
>> This is after removing 'hash:/usr/local/mailman/data/domain1-tld' from
>> virtual_alias_maps as you suggested and reloading Mailman and postfix.
>>
>> I'm embedded one comment and one question:
>>
>> Nov  1 11:51:29 mail postfix/postfix-script[5384]: refreshing the
>> Postfix mail system
>> Nov  1 11:51:29 mail postfix/master[19348]: reload -- version 2.6.5,
>> configuration /etc/postfix
>> Nov  1 11:51:59 mail postfix/smtpd[32434]: connect from
>> mail3.networktest.com[69.55.234.104]
>> Nov  1 11:51:59 mail postfix/trivial-rewrite[29411]: warning: do not
>> list domain domain1.tld in BOTH mydestination and virtual_mailbox_domains
>>
>> This is a possible clue. I think postfix is set up so that domain1.tld
>> *is* a virtual domain. The server -- Mailserver, an email server
>> appliance from Allard Software -- stores domain info in a SQL database
>> and postfix calls that database here:
>>
>> virtual_mailbox_domains =   proxy:mysql:/etc/postfix/sql/domains.cf
> 
> 
> Right. domain1.tld is defined to be a local domain because it is
> (indirectly) in mydestination. It is also in virtual_mailbox_domains
> and Postfix wants it to be in one or the other (either local or
> virtual) not both.
> 
> Note that if you remove it from mydestination and make it strictly a
> virtual_mailbox_domain, delivery TO s at domain1.com will stop working.
> See the FAQ at <http://wiki.list.org/x/ZoCj>.
> 
> 
>> Anyway, carrying on:
>>
>> Nov  1 11:51:59 mail postfix/smtpd[32434]: A91E1130CB:
>> client=mail3.networktest.com[69.55.234.104]
>> Nov  1 11:51:59 mail postfix/cleanup[25359]: A91E1130CB:
>> message-id=<4CCF0C4E.8000704 at networktest.com>
>> Nov  1 11:51:59 mail postfix/smtpd[32434]: disconnect from
>> mail3.networktest.com[69.55.234.104]
>> Nov  1 11:51:59 mail postfix/qmgr[20853]: A91E1130CB:
>> from=<dnewman at networktest.com>, size=1495, nrcpt=1 (queue active)
>> Nov  1 11:51:59 mail spamd[10619]: spamd: connection from localhost
>> [127.0.0.1] at port 45013
>> Nov  1 11:51:59 mail spamd[10619]: spamd: processing message
>> <4CCF0C4E.8000704 at networktest.com> for s at mail.domain1.tld:62
>> Nov  1 11:52:00 mail spamd[10619]: spamd: clean message (-0.0/5.0) for
>> s at mail.domain1.tld:62 in 1.1 seconds, 1467 bytes.
>> Nov  1 11:52:00 mail spamd[10619]: spamd: result: . 0 -
>> T_RP_MATCHES_RCVD
>> scantime=1.1,size=1467,user=s at mail.domain1.tld,uid=62,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=45013,mid=<4CCF0C4E.8000704 at networktest.com>,autolearn=ham
>>
>> Nov  1 11:52:01 mail postfix/pickup[1233]: 03422130CD: uid=506
>> from=<dnewman at networktest.com>
>> Nov  1 11:52:01 mail postfix/pipe[16800]: A91E1130CB:
>> to=<s at mail.domain1.tld>, orig_to=<s at domain1.tld>, relay=spamassassin,
>> delay=1.6, delays=0.33/0.02/0/1.2, dsn=2.0.0, status=sent (delivered via
>> spamassassin service)
>> Nov  1 11:52:01 mail postfix/qmgr[20853]: A91E1130CB: removed
> 
> 
> These (A91E1130CB) messages are the receipt if the mail from
> dnewman at networktest.com to s at domain1.com and its delivery to
> spamassassin.
> 
> 
>> Nov  1 11:52:01 mail postfix/cleanup[25359]: 03422130CD:
>> message-id=<4CCF0C4E.8000704 at networktest.com>
>> Nov  1 11:52:01 mail postfix/qmgr[20853]: 03422130CD:
>> from=<dnewman at networktest.com>, size=1762, nrcpt=1 (queue active)
>> Nov  1 11:52:01 mail spamd[18056]: prefork: child states: II
>> Nov  1 11:52:01 mail postfix/local[28131]: 03422130CD:
>> to=<s at mail.domain1.tld>, relay=local, delay=0.32,
>> delays=0.03/0.02/0/0.26, dsn=2.0.0, status=sent (delivered to command:
>> /usr/local/mailman/mail/mailman post s)
>> Nov  1 11:52:01 mail postfix/qmgr[20853]: 03422130CD: removed
> 
> 
> And these (03422130CD) are the mail being requeued after spamassassin
> and delivered vi the local alias to Mailman.
> 
> 
>> Nov  1 11:52:02 mail postfix/smtpd[32434]: connect from localhost[127.0.0.1]
>> Nov  1 11:52:02 mail postfix/trivial-rewrite[29411]: warning: do not
>> list domain domain1.tld in BOTH mydestination and virtual_mailbox_domains
>> Nov  1 11:52:02 mail postfix/smtpd[32434]: 80A72130CB:
>> client=localhost[127.0.0.1]
>> Nov  1 11:52:02 mail postfix/trivial-rewrite[29411]: warning: do not
>> list domain domain1.tld in BOTH mydestination and virtual_mailbox_domains
>> Nov  1 11:52:02 mail postfix/cleanup[25359]: 80A72130CB:
>> message-id=<4CCF0C4E.8000704 at networktest.com>
>> Nov  1 11:52:02 mail postfix/smtpd[32434]: disconnect from
>> localhost[127.0.0.1]
>> Nov  1 11:52:02 mail postfix/qmgr[20853]: 80A72130CB:
>> from=<s-bounces at domain1.tld>, size=2697, nrcpt=2 (queue active)
>> Nov  1 11:52:02 mail spamd[10619]: spamd: connection from localhost
>> [127.0.0.1] at port 5435
>> Nov  1 11:52:02 mail spamd[10619]: spamd: processing message
>> <4CCF0C4E.8000704 at networktest.com> for dnewman at domain1.tld:62
>> Nov  1 11:52:07 mail spamd[10619]: spamd: clean message (0.0/5.0) for
>> dnewman at domain1.tld:62 in 4.8 seconds, 2638 bytes.
>> Nov  1 11:52:07 mail spamd[10619]: spamd: result: . 0 -
>> scantime=4.8,size=2638,user=dnewman at domain1.tld,uid=62,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=5435,mid=<4CCF0C4E.8000704 at networktest.com>,autolearn=ham
>>
>> Nov  1 11:52:07 mail postfix/pickup[1233]: 7027A130CD: uid=506
>> from=<s-bounces at domain1.tld>
>> Nov  1 11:52:07 mail postfix/cleanup[25359]: 7027A130CD:
>> message-id=<4CCF0C4E.8000704 at networktest.com>
>> Nov  1 11:52:07 mail postfix/pipe[16800]: 80A72130CB:
>> to=<dnewman at networktest.com>, relay=spamassassin, delay=4.9,
>> delays=0.04/0/0/4.9, dsn=2.0.0, status=sent (delivered via spamassassin
>> service)
>> Nov  1 11:52:07 mail postfix/pipe[16800]: 80A72130CB:
>> to=<dnewman at domain1.tld>, relay=spamassassin, delay=4.9,
>> delays=0.04/0/0/4.9, dsn=2.0.0, status=sent (delivered via spamassassin
>> service)
>>
>>
>> I don't understand this entry. Since 's at domain1.tld' never received the
>> message, and since postfix says it was delivered OK, and since there's
>> no indication of trouble in the Mailman logs, what happened to the message?
>>
>>
>> Nov  1 11:52:07 mail postfix/qmgr[20853]: 80A72130CB: removed
>> Nov  1 11:52:07 mail postfix/qmgr[20853]: 7027A130CD:
>> from=<s-bounces at domain1.tld>, size=2759, nrcpt=1 (queue active)
>> Nov  1 11:52:07 mail spamd[18056]: prefork: child states: II
>> Nov  1 11:52:11 mail postfix/smtp[7413]: 7027A130CD:
>> to=<dnewman at networktest.com>,
>> relay=mail3.networktest.com[69.55.234.104]:25, delay=3.6,
>> delays=0.03/0.04/0.39/3.1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued
>> as EC0D3256A73)
>> Nov  1 11:52:11 mail postfix/qmgr[20853]: 7027A130CD: removed
> 
> 
> There are two message deliveries above.
> 
> 80A72130CB is the delivery of the message from mailman with two
> recipients, dnewman at domain1.tld and dnewman at networktest.com, and was
> processed through spamassassin (there are spamd reports) and the two
> entries immediately prior to your last comment above say that
> Postfix's pipe delivery piped the message to spamassassin for both
> recipients.
> 
> Then, 7027A130CD is the requeue from spamassassin of the message to
> dnewman at networktest.com which was then delivered via SMTP to the MTA
> at mail3.networktest.com.
> 
> But, there is apparently no requeue from spamassassin of the message to
> the dnewman at domain1.tld recipient.
> 
> My guess is that your spamassassin process doesn't properly handle
> messages with multiple recipients.
> 
> There are two things you could try. You could set
> 
> SMTP_MAX_RCPTS = 1
> 
> in mm_cfg.py to tell Mailman to deliver each recipient as a separate
> message.
> 
> Or, probably better, you could put
> 
> spamassassin_destination_recipient_limit = 1
> 
> in main.cf to cause Postfix to pipe only one recipient at a time to the
> spamassassin handler (see man 8 pipe).

Bingo. Your guess is correct. That one-line addition to main.cf now
allows Mailman message delivery to domain1.tld.


> 
> [...]
>>> Also, it appears you are taking
>>> <http://mailman.sourceforge.net/mailman-install/postfix-virtual.html>
>>> much too literally. That section describes a complicated situation which
>>> is not typically encountered in practice. And yes, it should probably be
>>> heavily revised.
>>
>> Clarity is desirable and too rare in technical writing. I'd be glad to
>> propose revisions to sections 6.1.1 and 6.1.2 of the docs once I
>> understand how this should work.
> 
> 
> Thank you. I'd appreciate that.

I'd be glad to write this up now that it's working. To whom should I
send a draft of the changes?

> 
> However, it now seems to me that you actually had the Mailman part of
> Postfix reasonably OK at the outset. The real issue now appears to me
> the use and configuration of spamassassin filtering in Postfix.

Agreed. With your help, I did make some changes from the Mailman docs,
for example removing a separate hash of domain1.tld from virtual_alias_maps.

> 
> Also note, You are doing way too much spamassassin scanning. You are
> scanning the inbound message before delivering it to Mailman, and then
> you are scanning the message again on its way from Mailman to the
> recipients. It might be better to set up a separate listener in
> Postfix on a different port and have Mailman deliver there and in
> Postfix only accept mail from Mailman (or localhost) on that port and
> bypass spamassassin for that mail.

OK, thanks. Setting up a separate listener in Postfix via master.cf is
no problem for me, but how would I configure Mailman to deliver to that
port?

thanks again

dn



> 


More information about the Mailman-Users mailing list