RE: Your Email (SOLVED)

2009-03-01 Thread Daniel C

I think I solve the issue...!!!

The problem was really coming from a dual submit using IMAP connections. 
SASL-Cyrus was activated correctly, but in my /etc/courier-imap/imap config 
file, the line:
OUTBOX=.Sent

Was set, which was doing this:

# If OUTBOX is defined, mail can be sent via the IMAP connection by copying
# a message to the INBOX.Outbox folder.

So when a mail was submitted via IMAP, mail was sent through SMTP, and a copy 
was sent using Courier-IMAP.

Thanks everyone for the help, insight and explanation on how mails were 
delivered.



Daniel




>> What user does amavis run as? What you say that Postfix uses "this new
>> user", what do you mean by that?
>
> Amavis is running as user: amavis (uid: 102) and group: amavis (gid: 408). 
> Maildirs are stored as user imap (uid: 1000) and group imap (gid: 1000). 
> Postfix is running as postfix (207/207). I added the user imap/imap to 
> seperate the maildir storage directory from the postfix dir.
>
>> Come on, there is no basis for this conclusion, indeed the opposite seems
>> likely, the extra copy has:
>
> I've just flashed onto something. Is it possible that when an email is sent, 
> the client is authenticated with IMAP credentials, and then again with the 
> SASL-Cyrus? From both header, it seems that one came from IMAP, and the other 
> from the server, which could explain that...?
>
>> Are you saying that Postfix adds the "X-IMAP-Sender" header that is not
>> in the original SMTP message? The second copy is injected by user 1000,
>> what is running as that user now?
>
> I don't know which email is the original, and which is not... As for the user 
> 1000, it's the user that stores the mail. There's no process running it, just 
> those directive in main.cf:
> virtual_gid_maps = static:1000
> virtual_uid_maps = static:1000
>
>> Don't waste your time looking for Postfix bugs. The unwanted duplication
>> will be found in non-Postfix code, unless you find it, you will make
>> no progress. Pursue this on the amavis list.
>
> I didn't say it was a postfix bug, maybe a misconfiguration from my part from 
> postfix, or one of the other daemon.
>
>> From your logs, below are shown the ONLY deliveries performed by Postfix.
>> No Postfix delivery is via a delivery agent that is capable of calling
>> sendmail(1) to fork the message, because lmtp(8) and virtual(8) simply
>> don't have code to do this. All deliveries before virtual(8) delivery
>> are to amavis, which is presumably still running as the wrong user
>> (1000 just like virtual(8) and the IMAP server, instead of a dedicated
>> user). Your amavis config forks the message. Don't do that.
>
> Thanks for the analysis. Look at the top of my mail for the uid/gid usage. 
> I'm really beginning to think there's a dual authentication somewhere. Or 
> maybe a misconfiguration in amavis...
>
>
> Daniel


RE: Your Email

2009-03-01 Thread Daniel C

> What user does amavis run as? What you say that Postfix uses "this new
> user", what do you mean by that?

Amavis is running as user: amavis (uid: 102) and group: amavis (gid: 408). 
Maildirs are stored as user imap (uid: 1000) and group imap (gid: 1000). 
Postfix is running as postfix (207/207). I added the user imap/imap to seperate 
the maildir storage directory from the postfix dir.

> Come on, there is no basis for this conclusion, indeed the opposite seems
> likely, the extra copy has:

I've just flashed onto something. Is it possible that when an email is sent, 
the client is authenticated with IMAP credentials, and then again with the 
SASL-Cyrus? From both header, it seems that one came from IMAP, and the other 
from the server, which could explain that...?

> Are you saying that Postfix adds the "X-IMAP-Sender" header that is not
> in the original SMTP message? The second copy is injected by user 1000,
> what is running as that user now?

I don't know which email is the original, and which is not... As for the user 
1000, it's the user that stores the mail. There's no process running it, just 
those directive in main.cf:
virtual_gid_maps = static:1000
virtual_uid_maps = static:1000

> Don't waste your time looking for Postfix bugs. The unwanted duplication
> will be found in non-Postfix code, unless you find it, you will make
> no progress. Pursue this on the amavis list.

I didn't say it was a postfix bug, maybe a misconfiguration from my part from 
postfix, or one of the other daemon.

> From your logs, below are shown the ONLY deliveries performed by Postfix.
> No Postfix delivery is via a delivery agent that is capable of calling
> sendmail(1) to fork the message, because lmtp(8) and virtual(8) simply
> don't have code to do this. All deliveries before virtual(8) delivery
> are to amavis, which is presumably still running as the wrong user
> (1000 just like virtual(8) and the IMAP server, instead of a dedicated
> user). Your amavis config forks the message. Don't do that.

Thanks for the analysis. Look at the top of my mail for the uid/gid usage. I'm 
really beginning to think there's a dual authentication somewhere. Or maybe a 
misconfiguration in amavis...


Daniel

Re: Your Email

2009-02-28 Thread Victor Duchovni
On Sun, Mar 01, 2009 at 03:49:18AM +, Daniel C wrote:

> I just changed the owner of the IMAP folder and assigned Postfix and 
> courier-authlib to use this new user. It has a UID and GID of 1000.

What user does amavis run as? What you say that Postfix uses "this new
user", what do you mean by that?

> Here a new set of headers (from both duplicated mails), and a copy of my log 
> from this. Sorry if I put a link in my message, it's because I can't include 
> all the header's data from Hotmail...
> 
> http://www.myrandor.com/postfix2.txt
> 
> From what I can see in there, the email is picked up only once from my
> mail client. So I suspect something's wrong in Postfix...

Come on, there is no basis for this conclusion, indeed the opposite seems
likely, the extra copy has:

Received: by mail.mydomain.com (Postfix, from userid 1000)
id 1E671420CF8; Sat, 28 Feb 2009 22:17:41 -0500 (EST)
X-IMAP-Sender: jac...@mydomain.com

Are you saying that Postfix adds the "X-IMAP-Sender" header that is not
in the original SMTP message? The second copy is injected by user 1000,
what is running as that user now?

> Seems like
> it delivered the mail to Amavis, but doing a copy to itself at the
> same time...?

Don't waste your time looking for Postfix bugs. The unwanted duplication
will be found in non-Postfix code, unless you find it, you will make
no progress. Pursue this on the amavis list.

>From your logs, below are shown the ONLY deliveries performed by Postfix.
No Postfix delivery is via a delivery agent that is capable of calling
sendmail(1) to fork the message, because lmtp(8) and virtual(8) simply
don't have code to do this. All deliveries before virtual(8) delivery
are to amavis, which is presumably still running as the wrong user
(1000 just like virtual(8) and the IMAP server, instead of a dedicated
user). Your amavis config forks the message. Don't do that.

In via smtpd(8) out via lmtp(8) to amavis:

Feb 28 22:17:40 homer postfix/smtpd[23674]: B82157EDC6:
client=ip-xxx.xxx.xxx.xxx.dsl-xxx.net[xxx.xxx.xxx.xxx],
sasl_method=PLAIN,sasl_username=jac...@mydomain.com
Feb 28 22:17:40 homer postfix/cleanup[23681]: B82157EDC6:
message-id=<49a9fe50.1090...@mydomain.com>
Feb 28 22:17:44 homer postfix/lmtp[23682]: B82157EDC6:
to=, relay=10.0.32.13[10.0.32.13]:10024,
delay=3.4, delays=0.08/0.01/0/3.3, dsn=2.0.0, status=sent
(250 2.0.0 Ok, id=15794-04, from MTA([10.0.32.13]:10025):
 250 2.0.0 Ok: queued as 0FF3437098E)

In via sendmail(1) out via lmtp(8) to amavis:

Feb 28 22:17:41 homer postfix/pickup[23038]: 1E671420CF8: uid=1000
from=
Feb 28 22:17:41 homer postfix/cleanup[23681]: 1E671420CF8:
message-id=<49a9fe50.1090...@mydomain.com>
Feb 28 22:17:44 homer postfix/lmtp[23697]: 1E671420CF8:
to=, relay=10.0.32.13[10.0.32.13]:10024,
delay=3.5, delays=0.05/0.01/0.01/3.4, dsn=2.0.0, status=sent
(250 2.0.0 Ok, id=23199-01, from MTA([10.0.32.13]:10025):
 250 2.0.0 Ok: queued as 887707EDC6)

In via smtpd(8) from amavis out via virtual(8) to maildir:

Feb 28 22:17:44 homer postfix/smtpd[23706]: 0FF3437098E:
client=homer.mydomain.com[10.0.32.13]
Feb 28 22:17:44 homer postfix/cleanup[23681]: 0FF3437098E:
message-id=<49a9fe50.1090...@mydomain.com>
Feb 28 22:17:44 homer postfix/virtual[23709]: 0FF3437098E:
to=, relay=virtual, delay=0.08,
delays=0.06/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)

In via smtpd(8) from amavis out via virtual(8) to maildir:

Feb 28 22:17:44 homer postfix/smtpd[23706]: 887707EDC6:
client=homer.mydomain.com[10.0.32.13]
Feb 28 22:17:44 homer postfix/cleanup[23681]: 887707EDC6:
message-id=<49a9fe50.1090...@mydomain.com>
Feb 28 22:17:44 homer postfix/virtual[23709]: 887707EDC6:
to=, relay=virtual, delay=0.02,
delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)

-- 
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:


If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.


RE: Your Email

2009-02-28 Thread Daniel C

I just changed the owner of the IMAP folder and assigned Postfix and 
courier-authlib to use this new user. It has a UID and GID of 1000.

Here a new set of headers (from both duplicated mails), and a copy of my log 
from this. Sorry if I put a link in my message, it's because I can't include 
all the header's data from Hotmail...

http://www.myrandor.com/postfix2.txt

>From what I can see in there, the email is picked up only once from my mail 
>client. So I suspect something's wrong in Postfix... Seems like it delivered 
>the mail to Amavis, but doing a copy to itself at the same time...?


Daniel


> Daniel C a écrit :
>> What would be the best strategy? Create a new user and change postfix, 
>> amavis and Courier-IMAP to use this user for message storing?
>
> No. do not the same user for different services:
>
> - keep the 'postfix' account for the postfix "server"
> - use amavis or vscan or whatever for amavisd-new
> - create a mailbox user and configure postfix to deliver mail as this user
> - courier-imap is generally run as root. if this is not needed, you can
> run it as the "mailbox" user
>
>
>> Is it easy to adjust configuration for this new user?
>>
>> Also, I think this is not causing my duplicate email, right?
>>
>
> as Viktor said, this makes troubleshooting harder. in this particular
> case, we have a message submitted by user 207, but we have no idea which
> service or program submitted the message.


Re: Your Email

2009-02-24 Thread mouss
Daniel C a écrit :
> What would be the best strategy? Create a new user and change postfix, amavis 
> and Courier-IMAP to use this user for message storing? 

No. do not the same user for different services:

- keep the 'postfix' account for the postfix "server"
- use amavis or vscan or whatever for amavisd-new
- create a mailbox user and configure postfix to deliver mail as this user
- courier-imap is generally run as root. if this is not needed, you can
run it as the "mailbox" user


> Is it easy to adjust configuration for this new user?
> 
> Also, I think this is not causing my duplicate email, right?
> 

as Viktor said, this makes troubleshooting harder. in this particular
case, we have a message submitted by user 207, but we have no idea which
service or program submitted the message.


Re: Your Email

2009-02-24 Thread Victor Duchovni
On Tue, Feb 24, 2009 at 04:31:55PM +, Daniel C wrote:

> What would be the best strategy? Create a new user and change postfix,
> amavis and Courier-IMAP to use this user for message storing? Is it easy
> to adjust configuration for this new user?

Yes, create a new user that will own IMAP mailboxes, and arrange for
this user to be used during mail delivery and access.

> Also, I think this is not causing my duplicate email, right?

Probably not, but it makes diagnostics more complex.

-- 
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:


If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.


RE: Your Email

2009-02-24 Thread Daniel C

What would be the best strategy? Create a new user and change postfix, amavis 
and Courier-IMAP to use this user for message storing? Is it easy to adjust 
configuration for this new user?

Also, I think this is not causing my duplicate email, right?


Daniel


> No, this is wrong, the "postfix" user must not be the owner the virtual
> mailboxes, and should not be used by the IMAP server to access them.
> Fix your configuration to avoid this problem.
>
> Use a suitable imap user, not "postfix".


Re: Your Email

2009-02-21 Thread Victor Duchovni
On Sun, Feb 22, 2009 at 03:35:34AM +, Daniel C wrote:

> As for Postfix, it has to be used

No, this is wrong, the "postfix" user must not be the owner the virtual
mailboxes, and should not be used by the IMAP server to access them.
Fix your configuration to avoid this problem.

> by courrier-imap in order to access the virtual maildir correctly,
> without having to change the ownership of the directories to allow
> "group" or "other". I hope I'm using a right strategy. ;)

Use a suitable imap user, not "postfix".

-- 
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:


If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.


RE: Your Email

2009-02-21 Thread Daniel C

> for example, if a filter, a delivery script, a .forward, ... uses the
> sendmail command.
 
Well, this is set as "virtual" and there's no .forward or delivery script. The 
problem suddenly happen after an upgrade of my system. Maybe there's a config 
somewhere that has been changed, I'm just wondering what...
 
> this is borked. do not reuse the "postfix" user. do not run these
> services using the same user.
 
I was a bit mistaken. Amavis has its own user. As for Postfix, it has to be 
used by courrier-imap in order to access the virtual maildir correctly, without 
having to change the ownership of the directories to allow "group" or "other". 
I hope I'm using a right strategy. ;)
 
Here's a complete copy of my master.cf file. I don't think I made a mistake in 
there, but maybe I'm wrong.
 
 
 
Daniel
 
 
-
master.cf
-
 
smtp  inet  n   -   n   -   -   smtpd
pickupfifo  n   -   n   60  1   pickup
cleanup   unix  n   -   n   -   0   cleanup
qmgr  fifo  n   -   n   300 1   qmgr
tlsmgrunix  -   -   n   1000?   1   tlsmgr
rewrite   unix  -   -   n   -   -   trivial-rewrite
bounceunix  -   -   n   -   0   bounce
defer unix  -   -   n   -   0   bounce
trace unix  -   -   n   -   0   bounce
verifyunix  -   -   n   -   1   verify
flush unix  n   -   n   1000?   0   flush
proxymap  unix  -   -   n   -   -   proxymap
proxywrite unix -   -   n   -   1   proxymap
smtp  unix  -   -   n   -   -   smtp
relay unix  -   -   n   -   -   smtp
-o smtp_fallback_relay=
showq unix  n   -   n   -   -   showq
error unix  -   -   n   -   -   error
retry unix  -   -   n   -   -   error
discard   unix  -   -   n   -   -   discard
local unix  -   n   n   -   -   local
virtual   unix  -   n   n   -   -   virtual
lmtp  unix  -   -   n   -   -   lmtp
anvil unix  -   -   n   -   1   anvil
scacheunix  -   -   n   -   1   scache
 
smtp-amavis unix -  -   n   -   2   lmtp
  -o lmtp_data_done_timeout=1200
  -o lmtp_send_xforward_command=yes
  -o disable_dns_lookups=yes
  -o max_use=20 
 
10.0.32.13:10025 inet n  -   n   -   -   smtpd
  -o content_filter=
  -o local_recipient_maps=
  -o relay_recipient_maps=
  -o smtpd_restrictions_classes=
  -o smtpd_helo_restrictions=
  -o smtpd_sender_restrictions=
  -o smtpd_client_restrictions=
  -o smtpd_recipient_restrictions=permit_mynetworks,reject
  -o mynetworks=127.0.0.0/8,10.0.32.0/24
  -o strict_rfc821_envelopes=yes
  -o smtpd_error_sleep_time=0
  -o smtpd_soft_error_limit=1001
  -o smtpd_hard_error_limit=1000
  -o receive_override_options=no_header_body_checks
 

Re: Your Email

2009-02-21 Thread mouss
Daniel C a écrit :
>> A broken HTML encapsulator is eating all content inside <>, in your
>> messages, can you post the headers and logs without going trhough
>> the broken (cross-site scripting vulnerable, ...) HTML generator?
>>
>> This message is submitted via SMTP from outside.
> 
> Well... The only choice I have it to send mail to the mailing list using my 
> Hotmail account, or I'll spam the mailing with 2 mails. The strange thing is 
> that I sent the mail in plain text. Anyway, here a link to both headers and 
> log so the mail client will not be in cause.
> http://www.myrandor.com/postfix.txt
> 
> 
>> This message is submitted locally. Remove the code that is generating
>> this local message copy via sendmail(1).
> 
> How can it submit itself locally? 

for example, if a filter, a delivery script, a .forward, ... uses the
sendmail command.

> Do I have to "grep" my conf file for a sendmail command?
> 
>> What is user 207 and what is creating the locally submitted message below?
> 
> User 207 is Postfix, the user that is running Postfix, Amavis and 
> Courier-IMAP.
> 

this is borked. do not reuse the "postfix" user. do not run these
services using the same user.


RE: Your Email

2009-02-21 Thread Daniel C

> A broken HTML encapsulator is eating all content inside <>, in your
> messages, can you post the headers and logs without going trhough
> the broken (cross-site scripting vulnerable, ...) HTML generator?
>
> This message is submitted via SMTP from outside.

Well... The only choice I have it to send mail to the mailing list using my 
Hotmail account, or I'll spam the mailing with 2 mails. The strange thing is 
that I sent the mail in plain text. Anyway, here a link to both headers and log 
so the mail client will not be in cause.
http://www.myrandor.com/postfix.txt


> This message is submitted locally. Remove the code that is generating
> this local message copy via sendmail(1).

How can it submit itself locally? Do I have to "grep" my conf file for a 
sendmail command?

> What is user 207 and what is creating the locally submitted message below?

User 207 is Postfix, the user that is running Postfix, Amavis and Courier-IMAP.



Daniel

Re: Your Email

2009-02-21 Thread Victor Duchovni
On Sat, Feb 21, 2009 at 07:53:30PM +, Daniel C wrote:

> ---
> Message #1
> ---
> Return-Path: 
> Received: from localhost (homer.mydomain.com [10.0.32.13])
> by mail.mydomain.com (Postfix) with ESMTP id 078CC372452
> for ; Sat, 21 Feb 2009 13:58:44 -0500 (EST)
> Received: from mail.mydomain.com ([10.0.32.13])
> by localhost (homer.mydomain.com [10.0.32.13]) (amavisd-new, port 10024)
> with LMTP id Bhudjsn5a1ui for ;
> Sat, 21 Feb 2009 13:58:40 -0500 (EST)
> Received: from [10.0.0.120] (ip-xxx.xxx.xxx.xxx.dsl-xxx.net [xxx.xxx.xxx.xxx])
> by mail.mydomain.com (Postfix) with ESMTP id 725511D9C79
> for ; Sat, 21 Feb 2009 13:58:40 -0500 (EST)

A broken HTML encapsulator is eating all content inside <>, in your
messages, can you post the headers and logs without going trhough
the broken (cross-site scripting vulnerable, ...) HTML generator?

This message is submitted via SMTP from outside.

> ---
> Message #2
> ---
> Received: from localhost (homer.mydomain.com [10.0.32.13])
> by mail.mydomain.com (Postfix) with ESMTP id 19F711903CB
> for ; Sat, 21 Feb 2009 13:58:47 -0500 (EST)
> Received: from mail.mydomain.com ([10.0.32.13])
> by localhost (homer.mydomain.com [10.0.32.13]) (amavisd-new, port 10024)
> with LMTP id xFoqocXefM+1 for ;
> Sat, 21 Feb 2009 13:58:40 -0500 (EST)
> Received: by mail.mydomain.com (Postfix, from userid 207)
> id 99AC83CFF59; Sat, 21 Feb 2009 13:58:40 -0500 (EST)

This message is submitted locally. Remove the code that is generating
this local message copy via sendmail(1).

> 
> Extract from my log
> 
> Feb 21 13:58:40 homer postfix/smtpd[6316]: connect from 
> ip-xxx.xxx.xxx.xxx.dsl-xxx.net[xxx.xxx.xxx.xxx]
> Feb 21 13:58:40 homer postfix/smtpd[6316]: 725511D9C79: 
> client=ip-xxx.xxx.xxx.xxx.dsl-xxx.net[xxx.xxx.xxx.xxx]
> Feb 21 13:58:40 homer postfix/cleanup[6344]: 725511D9C79: message-id=
> Feb 21 13:58:40 homer postfix/qmgr[4591]: 725511D9C79: from=, size=766, 
> nrcpt=1 (queue active)
> Feb 21 13:58:40 homer amavis[23470]: (23470-09) LMTP::10024 
> /var/amavis/tmp/amavis-20090221T131325-23470:  ->  SIZE=766 Received: from 
> mail.mydomain.com ([10.0.32.13]) by localhost (homer.mydomain.com 
> [10.0.32.13]) (amavisd-new, port 10024) with LMTP for ; Sat, 21 Feb 2009 
> 13:58:40 -0500 (EST)
> Feb 21 13:58:40 homer postfix/smtpd[6316]: disconnect from 
> ip-xxx.xxx.xxx.xxx.dsl-xxx.net[xxx.xxx.xxx.xxx]
> Feb 21 13:58:40 homer amavis[23470]: (23470-09) smtp connection cache, dt: 
> 1259.0, state: 0
> Feb 21 13:58:40 homer amavis[23470]: (23470-09) Checking: Bhudjsn5a1ui 
> [xxx.xxx.xxx.xxx]  -> 
> Feb 21 13:58:40 homer amavis[23470]: (23470-09) p001 1 Content-Type: 
> text/html, size: 198 B, name: 

What is user 207 and what is creating the locally submitted message below?

> Feb 21 13:58:40 homer postfix/pickup[4590]: 99AC83CFF59: uid=207 from=
> Feb 21 13:58:40 homer postfix/cleanup[6344]: 99AC83CFF59: message-id=
> Feb 21 13:58:40 homer postfix/qmgr[4591]: 99AC83CFF59: from=, size=705, 
> nrcpt=1 (queue active)
> Feb 21 13:58:40 homer amavis[14164]: (14164-12) LMTP::10024 
> /var/amavis/tmp/amavis-20090221T123157-14164:  ->  SIZE=705 Received: from 
> mail.mydomain.com ([10.0.32.13]) by localhost (homer.mydomain.com 
> [10.0.32.13]) (amavisd-new, port 10024) with LMTP for ; Sat, 21 Feb 2009 
> 13:58:40 -0500 (EST)
> Feb 21 13:58:40 homer amavis[14164]: (14164-12) smtp connection cache, dt: 
> 9.2, state: 0
> Feb 21 13:58:40 homer amavis[14164]: (14164-12) Checking: xFoqocXefM+1  -> 
> Feb 21 13:58:40 homer amavis[14164]: (14164-12) p001 1 Content-Type: 
> text/html, size: 199 B, name: 
> Feb 21 13:58:44 homer amavis[23470]: (23470-09) SPAM-TAG,  -> , No, 
> score=-1.451 required=3 tests=[AWL=-0.410, BAYES_00=-2.599, 
> HTML_MESSAGE=0.001, MIME_HTML_ONLY=1.457, RDNS_DYNAMIC=0.1]
> Feb 21 13:58:44 homer postfix/smtpd[6349]: connect from 
> homer.mydomain.com[10.0.32.13]
> Feb 21 13:58:44 homer postfix/smtpd[6349]: 078CC372452: 
> client=homer.mydomain.com[10.0.32.13]
> Feb 21 13:58:44 homer postfix/cleanup[6344]: 078CC372452: message-id=
> Feb 21 13:58:44 homer postfix/qmgr[4591]: 078CC372452: from=, size=1430, 
> nrcpt=1 (queue active)
> Feb 21 13:58:44 homer postfix/smtpd[6349]: disconnect from 
> homer.mydomain.com[10.0.32.13]
> Feb 21 13:58:44 homer amavis[23470]: (23470-09) FWD via SMTP:  -> ,BODY=7BIT 
> 250 2.0.0 Ok, id=23470-09, from MTA([10.0.32.13]:10025): 250 2.0.0 Ok: queued 
> as 078CC372452
> Feb 21 13:58:44 homer postfix/qmgr[4591]: 078CC372452: removed
> Feb 21 13:58:44 homer postfix/virtual[6352]: 078CC372452: to=, relay=virtual, 
> delay=0.01, delays=0.

RE: Your Email

2009-02-21 Thread Daniel C

> This is an corruped and incomplete set of message headers.
>
> And yet, it is fairly clear that the two messages are unrelated and
> not the same, since one arrives via SMTP and other is submmitted
> locally by user 207. Showing the headers separately from the related
> mail logs is not terribly useful.
>
> Read the headers and related logs carefully. Make sure they are not
> broken and match up. Then if you still believe Postfix is duplicating
> your message, post the associated headers and logs.

Here's the complete headers and logs for the following mail. I've included the 
Amavis part in case it could help. As you can see, there's only one "Connect 
from", which seems to mean that the client is only connecting once.


Daniel


---
Message #1
---
Return-Path: 
X-Original-To: jac...@mydomain.com
Delivered-To: jac...@mydomain.com
Received: from localhost (homer.mydomain.com [10.0.32.13])
by mail.mydomain.com (Postfix) with ESMTP id 078CC372452
for ; Sat, 21 Feb 2009 13:58:44 -0500 (EST)
X-Virus-Scanned: by amavisd-new using ClamAV at mydomain.com
X-Spam-Flag: NO
X-Spam-Score: -1.451
X-Spam-Level: 
X-Spam-Status: No, score=-1.451 required=3 tests=[AWL=-0.410, BAYES_00=-2.599,
HTML_MESSAGE=0.001, MIME_HTML_ONLY=1.457, RDNS_DYNAMIC=0.1]
Received: from mail.mydomain.com ([10.0.32.13])
by localhost (homer.mydomain.com [10.0.32.13]) (amavisd-new, port 10024)
with LMTP id Bhudjsn5a1ui for ;
Sat, 21 Feb 2009 13:58:40 -0500 (EST)
Received: from [10.0.0.120] (ip-xxx.xxx.xxx.xxx.dsl-xxx.net [xxx.xxx.xxx.xxx])
by mail.mydomain.com (Postfix) with ESMTP id 725511D9C79
for ; Sat, 21 Feb 2009 13:58:40 -0500 (EST)
Message-ID: 
Date: Sat, 21 Feb 2009 13:58:40 -0500
From: Daniel C 
User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209)
MIME-Version: 1.0
To: Daniel C 
Subject: Test...
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit


---
Message #2
---
Return-Path: 
X-Original-To: jac...@mydomain.com
Delivered-To: jac...@mydomain.com
Received: from localhost (homer.mydomain.com [10.0.32.13])
by mail.mydomain.com (Postfix) with ESMTP id 19F711903CB
for ; Sat, 21 Feb 2009 13:58:47 -0500 (EST)
X-Virus-Scanned: by amavisd-new using ClamAV at mydomain.com
X-Spam-Flag: NO
X-Spam-Score: -1.1
X-Spam-Level: 
X-Spam-Status: No, score=-1.1 required=3 tests=[AWL=0.042, BAYES_00=-2.599,
HTML_MESSAGE=0.001, MIME_HTML_ONLY=1.457, NO_RELAYS=-0.001]
Received: from mail.mydomain.com ([10.0.32.13])
by localhost (homer.mydomain.com [10.0.32.13]) (amavisd-new, port 10024)
with LMTP id xFoqocXefM+1 for ;
Sat, 21 Feb 2009 13:58:40 -0500 (EST)
Received: by mail.mydomain.com (Postfix, from userid 207)
id 99AC83CFF59; Sat, 21 Feb 2009 13:58:40 -0500 (EST)
X-IMAP-Sender: jac...@mydomain.com
Message-ID: 
Date: Sat, 21 Feb 2009 13:58:40 -0500
From: Daniel C 
User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209)
MIME-Version: 1.0
To: Daniel C 
Subject: Test...
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit


Extract from my log

Feb 21 13:58:40 homer postfix/smtpd[6316]: connect from 
ip-xxx.xxx.xxx.xxx.dsl-xxx.net[xxx.xxx.xxx.xxx]
Feb 21 13:58:40 homer postfix/smtpd[6316]: 725511D9C79: 
client=ip-xxx.xxx.xxx.xxx.dsl-xxx.net[xxx.xxx.xxx.xxx]
Feb 21 13:58:40 homer postfix/cleanup[6344]: 725511D9C79: message-id=
Feb 21 13:58:40 homer postfix/qmgr[4591]: 725511D9C79: from=, size=766, nrcpt=1 
(queue active)
Feb 21 13:58:40 homer amavis[23470]: (23470-09) LMTP::10024 
/var/amavis/tmp/amavis-20090221T131325-23470:  ->  SIZE=766 Received: from 
mail.mydomain.com ([10.0.32.13]) by localhost (homer.mydomain.com [10.0.32.13]) 
(amavisd-new, port 10024) with LMTP for ; Sat, 21 Feb 2009 13:58:40 -0500 (EST)
Feb 21 13:58:40 homer postfix/smtpd[6316]: disconnect from 
ip-xxx.xxx.xxx.xxx.dsl-xxx.net[xxx.xxx.xxx.xxx]
Feb 21 13:58:40 homer amavis[23470]: (23470-09) smtp connection cache, dt: 
1259.0, state: 0
Feb 21 13:58:40 homer amavis[23470]: (23470-09) Checking: Bhudjsn5a1ui 
[xxx.xxx.xxx.xxx]  -> 
Feb 21 13:58:40 homer amavis[23470]: (23470-09) p001 1 Content-Type: text/html, 
size: 198 B, name: 
Feb 21 13:58:40 homer postfix/pickup[4590]: 99AC83CFF59: uid=207 from=
Feb 21 13:58:40 homer postfix/cleanup[6344]: 99AC83CFF59: message-id=
Feb 21 13:58:40 homer postfix/qmgr[4591]: 99AC83CFF59: from=, size=705, nrcpt=1 
(queue active)
Feb 21 13:58:40 homer amavis[14164]: (14164-12) LMTP::10024 
/var/amavis/tmp/amavis-20090221T123157-14164:  ->  SIZE=705 Received: from 
mail.mydomain.com ([10.0.32.13]) by localhost (homer.mydomain.com [10.0.32.13]) 
(amavisd-new, port 10024) with LMTP for ; Sat

Re: Your Email

2009-02-21 Thread Victor Duchovni
On Sat, Feb 21, 2009 at 07:02:41PM +, Daniel C wrote:

> Message #1
> ---
> Received: from localhost (homer.mydomain.com [10.0.32.13])
>   by mail.mydomain.com (Postfix) with ESMTP id 561804498EF
>   for ; Sat, 21 Feb 2009 13:37:41 -0500 (EST)
> Received: from mail.mydomain.com ([10.0.32.13])
>   by localhost (homer.mydomain.com [10.0.32.13])
>   (amavisd-new, port 10024)
>   with LMTP id NHSD4caH1jdE
>   for ; Sat, 21 Feb 2009 13:37:38 -0500 (EST)
> Received: from [10.0.0.120] (ip-xxx.xxx.xxx.xxx.dsl-xxx.xxx [xxx.xxx.xxx.xxx])
>   by mail.mydomain.com (Postfix) with ESMTP id 0421137074D
>   for ; Sat, 21 Feb 2009 13:37:37 -0500 (EST)

This is an incomplete set of message headers.

> Message #2
> ---
> Received: from localhost (homer.mydomain.com [10.0.32.13])
>   by mail.mydomain.com (Postfix) with ESMTP id 79CF64498EC
>   for ; Sat, 21 Feb 2009 13:37:41 -0500 (EST)
> Received: from mail.mydomain.com ([10.0.32.13])
>   by localhost (homer.mydomain.com [10.0.32.13])
>   (amavisd-new, port 10024)
>   with LMTP id QgPsqaEw4tIc
>   for ; Sat, 21 Feb 2009 13:37:38 -0500 (EST)
> [... something missing here ...]
>   by mail.mydomain.com (Postfix, from userid 207)
>   id 314664498FC;
>   Sat, 21 Feb 2009 13:37:38 -0500 (EST)
> 

This is an corruped and incomplete set of message headers.

And yet, it is fairly clear that the two messages are unrelated and
not the same, since one arrives via SMTP and other is submmitted
locally by user 207. Showing the headers separately from the related
mail logs is not terribly useful.

Read the headers and related logs carefully. Make sure they are not
broken and match up. Then if you still believe Postfix is duplicating
your message, post the associated headers and logs.

-- 
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:


If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.


RE: Your Email

2009-02-21 Thread Daniel C

Here's the header part of the 2 mails I receive when they are duplicate. From 
what I can understand, it seems that there's only one connection made to 
Postfix, but Postfix send the mail to LMTP, but made a new copy and send it to 
itself, which is then sent to LMTP too.

Does it means something else?


Daniel


---
Message #1
---
Received: from localhost (homer.mydomain.com [10.0.32.13])by 
mail.mydomain.com (Postfix) with ESMTP id 561804498EF
for ; Sat, 21 Feb 2009 13:37:41 -0500 (EST)
Received: from mail.mydomain.com ([10.0.32.13])by localhost 
(homer.mydomain.com [10.0.32.13]) (amavisd-new, port 10024)
with LMTP id NHSD4caH1jdE for ;
Sat, 21 Feb 2009 13:37:38 -0500 (EST)
Received: from [10.0.0.120] (ip-xxx.xxx.xxx.xxx.dsl-xxx.xxx [xxx.xxx.xxx.xxx])
by mail.mydomain.com (Postfix) with ESMTP id 0421137074D
for ; Sat, 21 Feb 2009 13:37:37 -0500 (EST)


---
Message #2
---
Received: from localhost (homer.mydomain.com [10.0.32.13])by 
mail.mydomain.com (Postfix) with ESMTP id 79CF64498EC
for ; Sat, 21 Feb 2009 13:37:41 -0500 (EST)
Received: from mail.mydomain.com ([10.0.32.13])by localhost 
(homer.mydomain.com [10.0.32.13]) (amavisd-new, port 10024)
with LMTP id QgPsqaEw4tIc for ;
Sat, 21 Feb 2009 13:37:38 -0500 (EST)
by mail.mydomain.com (Postfix, from userid 207)id 314664498FC; Sat, 21 Feb 
2009 13:37:38 -0500 (EST)


RE: Your Email

2009-02-21 Thread Daniel C

> The mail is apparently submitted twice by your mail client.
> This does not appear to be a postfix or SASL problem.
>
> You earlier wrote that a manual telnet session with
> authentication did not exhibit the duplicated mail problem.
> This confirms that it is a mail client problem, not a postfix
> or SASL problem.


Well, I could understand if it was cause by the client... What I don't 
understand is why it was working before, and there an issue now? For client, it 
has an issue on both Thunderbird and a webmail (Horde/Imp) installed locally...!

Also, mail delivered directly through PHP (with mail()) is not delivered 
twice...

I can't understand the logic behind all this...


Daniel


Re: Your Email

2009-02-20 Thread Sahil Tandon
On Sat, 21 Feb 2009, Daniel C wrote:

> For the duplicate message, from what I saw too, it looked like the same
> message was sent twice. Could it be from the authentication? Could you just
> take a look to see if I'm missing something there?

No, it has nothing to do with authentication.

-- 
Sahil Tandon 


Re: Your Email

2009-02-20 Thread Noel Jones

Daniel C wrote:

For the duplicate message, from what I saw too, it looked like the same message 
was sent twice. Could it be from the authentication? Could you just take a look 
to see if I'm missing something there?



The mail is apparently submitted twice by your mail client. 
This does not appear to be a postfix or SASL problem.


You earlier wrote that a manual telnet session with 
authentication did not exhibit the duplicated mail problem. 
This confirms that it is a mail client problem, not a postfix 
or SASL problem.



  -- Noel Jones


RE: Your Email

2009-02-20 Thread Daniel C




> Date: Fri, 20 Feb 2009 12:36:07 -0600
> From: njo...@megan.vbhcs.org
> To: jackey...@hotmail.com; postfix-users@postfix.org
> Subject: Re: Your Email
>
> Daniel C wrote:
>> Hi,
>>
>> Sorry for the informations missing. Here they are. This is running on a 
>> vserver, which are behind a iptables firewall, and the local IPs are in the 
>> range 10.0.32.0/24.
>>
>>
>>
>
> I've annotated your logs...
>
> Feb 19 22:23:15 homer postfix/smtpd[3711]: connect from
> xx[xxx.xxx.xxx.xxx]
> Feb 19 22:23:16 homer postfix/smtpd[3711]: 1B292370557:
> client=xx[xxx.xxx.xxx.xxx], sasl_method=PLAIN,
> sasl_username=jac...@mydomain.com
> Feb 19 22:23:16 homer postfix/cleanup[3893]: 1B292370557:
> message-id=
> Feb 19 22:23:16 homer postfix/qmgr[3176]: 1B292370557: from=,
> size=796, nrcpt=1 (queue active)
> Feb 19 22:23:16 homer postfix/smtpd[3711]: disconnect from
> xx[xxx.xxx.xxx.xxx]
>
> message A arrives via SMTP AUTH
> One recipient.
>
> Feb 19 22:23:16 homer postfix/pickup[3175]: 4774B3706C6:
> uid=207 from=
> Feb 19 22:23:16 homer postfix/cleanup[3893]: 4774B3706C6:
> message-id=
> Feb 19 22:23:16 homer postfix/qmgr[3176]: 4774B3706C6: from=,
> size=686, nrcpt=1 (queue active)
>
> message B arrives via sendmail(1)
> one recipient.
>
> Feb 19 22:23:19 homer postfix/smtpd[3910]: connect from
> mail.mydomain.com[10.0.32.13]
> Feb 19 22:23:19 homer postfix/smtpd[3910]: 81995370679:
> client=homer.mydomain.com[10.0.32.13]
> Feb 19 22:23:19 homer postfix/cleanup[3893]: 81995370679:
> message-id=
> Feb 19 22:23:19 homer postfix/qmgr[3176]: 81995370679: from=,
> size=1269, nrcpt=1 (queue active)
> Feb 19 22:23:19 homer postfix/smtpd[3910]: disconnect from
> homer.mydomain.com[10.0.32.13]
>
> message AF arrives from content filter
> still one recipient.
>
> Feb 19 22:23:19 homer postfix/qmgr[3176]: 1B292370557: removed
> Feb 19 22:23:19 homer postfix/lmtp[3894]: 1B292370557: to=,
> relay=10.0.32.13[10.0.32.13]:10024, delay=3.5,
> delays=0.1/0.01/0/3.4, dsn=2.0.0, status=sent (250 2.0.0 Ok,
> id=21166-10, from MTA([10.0.32.13]:10025): 250 2.0.0 Ok:
> queued as 81995370679)
>
> message A sent to content filter, new ID is 81995370679 (AF)
>
> Feb 19 22:23:19 homer postfix/smtpd[3910]: connect from
> homer.mydomain.com[10.0.32.13]
> Feb 19 22:23:19 homer postfix/smtpd[3910]: 9ACC2370557:
> client=homer.mydomain.com[10.0.32.13]
> Feb 19 22:23:19 homer postfix/cleanup[3893]: 9ACC2370557:
> message-id=
> Feb 19 22:23:19 homer postfix/qmgr[3176]: 9ACC2370557: from=,
> size=1159, nrcpt=1 (queue active)
> Feb 19 22:23:19 homer postfix/smtpd[3910]: disconnect from
> homer.mydomain.com[10.0.32.13]
>
> message BF arrives from content filter
> still one recipient
>
> Feb 19 22:23:19 homer postfix/lmtp[3900]: 4774B3706C6: to=,
> relay=10.0.32.13[10.0.32.13]:10024, delay=3.4,
> delays=0.05/0.01/0/3.3, dsn=2.0.0, status=sent (250 2.0.0 Ok,
> id=21929-10, from MTA([10.0.32.13]:10025): 250 2.0.0 Ok:
> queued as 9ACC2370557)
> Feb 19 22:23:19 homer postfix/qmgr[3176]: 4774B3706C6: removed
>
> message B sent to content filter, new ID 9ACC2370557 (BF)
>
> Feb 19 22:23:20 homer postfix/smtp[3913]: 81995370679: to=,
> relay=mx4.hotmail.com[65.54.244.104]:25, delay=0.6,
> delays=0.01/0.01/0.25/0.34, dsn=2.0.0, status=sent (250
> Queued mail for delivery)
> Feb 19 22:23:20 homer postfix/qmgr[3176]: 81995370679: removed
>
> message AF delivered to destination
>
> Feb 19 22:23:20 homer postfix/smtp[3914]: 9ACC2370557: to=,
> relay=mx3.hotmail.com[65.54.244.72]:25, delay=0.56,
> delays=0.01/0.01/0.25/0.31, dsn=2.0.0, status=sent (250
> Queued mail for delivery)
> Feb 19 22:23:20 homer postfix/qmgr[3176]: 9ACC2370557: removed
>
> mesasge BF delivered to destination
>
> ==
>
> Looks from here as if the message was submitted twice. The
> problem you report is apparently not a postfix problem, nor
> related to your content_filter.
>
> BTW (and not related to your reported problem), check the RBLs
> you are using in your smtpd_recipient_restrictions; several of
> them are dead.
>
>
> -- Noel Jones


Thanks for the informations. I looked at all my RBLs and modified them.

For the duplicate message, from what I saw too, it looked like the same message 
was sent twice. Could it be from the authentication? Could you just take a look 
to see if I'm missing something there?

SASLAUTD is started with the "-a pam -r" options.


In my /etc/sasl2/smtp.conf


mech_list: PLAIN LOGIN
pwchec

Re: Your Email

2009-02-20 Thread Noel Jones

Daniel C wrote:

Hi,

Sorry for the informations missing. Here they are. This is running on a 
vserver, which are behind a iptables firewall, and the local IPs are in the 
range 10.0.32.0/24.





I've annotated your logs...

Feb 19 22:23:15 homer postfix/smtpd[3711]: connect from 
xx[xxx.xxx.xxx.xxx]
Feb 19 22:23:16 homer postfix/smtpd[3711]: 1B292370557: 
client=xx[xxx.xxx.xxx.xxx], sasl_method=PLAIN, 
sasl_username=jac...@mydomain.com
Feb 19 22:23:16 homer postfix/cleanup[3893]: 1B292370557: 
message-id=
Feb 19 22:23:16 homer postfix/qmgr[3176]: 1B292370557: from=, 
size=796, nrcpt=1 (queue active)
Feb 19 22:23:16 homer postfix/smtpd[3711]: disconnect from 
xx[xxx.xxx.xxx.xxx]


message A arrives via SMTP AUTH
One recipient.

Feb 19 22:23:16 homer postfix/pickup[3175]: 4774B3706C6: 
uid=207 from=
Feb 19 22:23:16 homer postfix/cleanup[3893]: 4774B3706C6: 
message-id=
Feb 19 22:23:16 homer postfix/qmgr[3176]: 4774B3706C6: from=, 
size=686, nrcpt=1 (queue active)


message B arrives via sendmail(1)
one recipient.

Feb 19 22:23:19 homer postfix/smtpd[3910]: connect from 
mail.mydomain.com[10.0.32.13]
Feb 19 22:23:19 homer postfix/smtpd[3910]: 81995370679: 
client=homer.mydomain.com[10.0.32.13]
Feb 19 22:23:19 homer postfix/cleanup[3893]: 81995370679: 
message-id=
Feb 19 22:23:19 homer postfix/qmgr[3176]: 81995370679: from=, 
size=1269, nrcpt=1 (queue active)
Feb 19 22:23:19 homer postfix/smtpd[3910]: disconnect from 
homer.mydomain.com[10.0.32.13]


message AF arrives from content filter
still one recipient.

Feb 19 22:23:19 homer postfix/qmgr[3176]: 1B292370557: removed
Feb 19 22:23:19 homer postfix/lmtp[3894]: 1B292370557: to=, 
relay=10.0.32.13[10.0.32.13]:10024, delay=3.5, 
delays=0.1/0.01/0/3.4, dsn=2.0.0, status=sent (250 2.0.0 Ok, 
id=21166-10, from MTA([10.0.32.13]:10025): 250 2.0.0 Ok: 
queued as 81995370679)


message A sent to content filter, new ID is 81995370679 (AF)

Feb 19 22:23:19 homer postfix/smtpd[3910]: connect from 
homer.mydomain.com[10.0.32.13]
Feb 19 22:23:19 homer postfix/smtpd[3910]: 9ACC2370557: 
client=homer.mydomain.com[10.0.32.13]
Feb 19 22:23:19 homer postfix/cleanup[3893]: 9ACC2370557: 
message-id=
Feb 19 22:23:19 homer postfix/qmgr[3176]: 9ACC2370557: from=, 
size=1159, nrcpt=1 (queue active)
Feb 19 22:23:19 homer postfix/smtpd[3910]: disconnect from 
homer.mydomain.com[10.0.32.13]


message BF arrives from content filter
still one recipient

Feb 19 22:23:19 homer postfix/lmtp[3900]: 4774B3706C6: to=, 
relay=10.0.32.13[10.0.32.13]:10024, delay=3.4, 
delays=0.05/0.01/0/3.3, dsn=2.0.0, status=sent (250 2.0.0 Ok, 
id=21929-10, from MTA([10.0.32.13]:10025): 250 2.0.0 Ok: 
queued as 9ACC2370557)

Feb 19 22:23:19 homer postfix/qmgr[3176]: 4774B3706C6: removed

message B sent to content filter, new ID 9ACC2370557 (BF)

Feb 19 22:23:20 homer postfix/smtp[3913]: 81995370679: to=, 
relay=mx4.hotmail.com[65.54.244.104]:25, delay=0.6, 
delays=0.01/0.01/0.25/0.34, dsn=2.0.0, status=sent (250 
Queued mail for delivery)

Feb 19 22:23:20 homer postfix/qmgr[3176]: 81995370679: removed

message AF delivered to destination

Feb 19 22:23:20 homer postfix/smtp[3914]: 9ACC2370557: to=, 
relay=mx3.hotmail.com[65.54.244.72]:25, delay=0.56, 
delays=0.01/0.01/0.25/0.31, dsn=2.0.0, status=sent (250 
Queued mail for delivery)

Feb 19 22:23:20 homer postfix/qmgr[3176]: 9ACC2370557: removed

mesasge BF delivered to destination

==

Looks from here as if the message was submitted twice.  The 
problem you report is apparently not a postfix problem, nor 
related to your content_filter.


BTW (and not related to your reported problem), check the RBLs 
you are using in your smtpd_recipient_restrictions; several of 
them are dead.



  -- Noel Jones


RE: Your Email

2009-02-19 Thread Duane Hill

On Fri, 20 Feb 2009, Daniel C wrote:


smtpd_recipient_restrictions = permit_mynetworks,

...

   reject_rbl_client list.dsbl.org,


Remove this. It is not active. See:

http://dsbl.org/


RE: Your Email

2009-02-19 Thread Daniel C

Hi,

Sorry for the informations missing. Here they are. This is running on a 
vserver, which are behind a iptables firewall, and the local IPs are in the 
range 10.0.32.0/24.



Daniel



Modification from the original master.cf



smtp-amavis unix -  -   n   -   2   lmtp
  -o lmtp_data_done_timeout=1200
  -o lmtp_send_xforward_command=yes
  -o disable_dns_lookups=yes
  -o max_use=20

10.0.32.13:10025 inet n  -   n   -   -   smtpd
  -o content_filter=
  -o local_recipient_maps=
  -o relay_recipient_maps=
  -o smtpd_restrictions_classes=
  -o smtpd_helo_restrictions=
  -o smtpd_sender_restrictions=
  -o smtpd_client_restrictions=
  -o smtpd_recipient_restrictions=permit_mynetworks,reject
  -o mynetworks=127.0.0.0/8,10.0.32.0/24
  -o strict_rfc821_envelopes=yes
  -o smtpd_error_sleep_time=0
  -o smtpd_soft_error_limit=1001
  -o smtpd_hard_error_limit=1000
  -o receive_override_options=no_header_body_checks




postconf -n

alias_database = hash:/etc/mail/aliases
alias_maps = hash:/etc/mail/aliases
allow_percent_hack = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[10.0.32.13]:10024
daemon_directory = /usr/lib64/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debug_peer_list = localhost
default_destination_concurrency_limit = 2
disable_vrfy_command = yes
home_mailbox = maildir/
html_directory = /usr/share/doc/postfix-2.5.6/html
local_destination_concurrency_limit = 2
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 2048
mynetworks = 10.0.32.0/24, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.5.6/readme
receive_override_options = no_address_mappings
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unauth_destination,
reject_rbl_client opm.blitzed.org,
reject_rbl_client list.dsbl.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client sbl.spamhaus.org,
reject_rbl_client dnsbl.ahbl.org,
reject_rhsbl_sender rhsbl.ahbl.org
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = mydomain.com
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = reject_unknown_sender_domain
swap_bangpath = no
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:207
virtual_mailbox_base = /usr/local/virtual
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 5120
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 100
virtual_transport = virtual
virtual_uid_maps = static:207



Extract from my log where one mail is sent twice


Feb 19 22:23:15 homer postfix/smtpd[3711]: connect from 
xx[xxx.xxx.xxx.xxx]
Feb 19 22:23:16 homer postfix/smtpd[3711]: 1B292370557: 
client=xx[xxx.xxx.xxx.xxx], sasl_method=PLAIN, 
sasl_username=jac...@mydomain.com
Feb 19 22:23:16 homer postfix/cleanup[3893]: 1B292370557: message-id=
Feb 19 22:23:16 homer postfix/qmgr[3176]: 1B292370557: from=, size=796, nrcpt=1 
(queue active)
Feb 19 22:23:16 homer postfix/smtpd[3711]: disconnect from 
xx[xxx.xxx.xxx.xxx]
Feb 19 22:23:16 homer postfix/pickup[3175]: 4774B3706C6: uid=207 from=
Feb 19 22:23:16 homer postfix/cleanup[3893]: 4774B3706C6: message-id=
Feb 19 22:23:16 homer postfix/qmgr[3176]: 4774B3706C6: from=, size=686, nrcpt=1 
(queue active)
Feb 19 22:23:19 homer postfix/smtpd[3910]: connect from 
mail.mydomain.com[10.0.32.13]
Feb 19 22:23:19 homer postfix/smtpd[3910]: 81995370679: 
client=homer.mydomain.com[10.0.32.13]   
Feb 19 22:23:19 homer postfix/cleanup[3893]: 81995370679: message-id=
Feb 19 22:23:19 homer postfix/qmgr[3176]: 81995370679: from=, size=1269, 
nrcpt=1 (queue active)
Feb 19 22:23:19 homer postfix/smtpd[3910]: disconnect from 
homer.mydomain.com[10.0.32.13]
Feb 19 22:23:19 homer postfix/qmgr[3176]: 1B292370557: removed
Feb 19 22:23:19 homer postfix/lmtp[3894]: 1B292370557: to=, 
relay=10.0.32.13[10.0.32.13]:10024, delay=3.5, delays=0.1/0.01/0/3.4, 
dsn=2.0.0, status=sent (250 2.0.0 Ok, id=21166-10, from 
MTA([10.0.32.13]:10025): 250 2.0.0 Ok: queued as 81995370679)
Feb 19 22:23:19 homer postfix/smtpd[3910]: connect from 
homer

Re: Your Email

2009-02-19 Thread Noel Jones

Daniel C wrote:

Hi,

Since a upgrade I made last week I've been having a very strange issue.
Whenever I send an email using my server as an SMTP (with Cyrus-SASL
authentication), all my emails are sent in double. Also, when I send an
email using Imp/Horde (Webmail), emails are also sent in double.

But what is strange, is that when I send an email in telnet (with
authentication), the email is not doubled. Same thing with cron's mail,
and from mails coming from the outside (Internet)

I'm currently using Linux Gentoo with Postfix 2.5.6, Amavisd-new 2.6.1,
Cyrus-SASL 2.1.22 and CourierImap/Authdaemon. All of this is configured
using Virtual Postfix in MySQL, with MD5 passwords.

Before my upgrade, all my software were 2 years old and the configuration
wasn't changed a bit.

I've made a few tests. From what I can see, SASL is authenticated once,
but the email is really sent twice. I've tried putting content_filter to
none in the pickup area in master.cf. The results, there is still 2 emails,
one have the Amavis header, the other not. Which seem to means that the
email is coming back someway.

What I don't understand, is that why this doesn't happenned with all the
mails, just the one that are sent using a client software, or a client
webmail...

Any help is appreciated!!!


Daniel



For general debugging stratagies, see: 
http://www.postfix.org/DEBUG_README.html


For help with postfix, please see:
http://www.postfix.org/DEBUG_README.html#mail

We'll need to see your "postconf -n" output, changes you've 
made to master.cf, and postfix logs demonstrating the problem 
for any hope of helping you.


  -- Noel Jones