Re: status during email life ...

2009-11-13 Thread Victor Duchovni
On Fri, Nov 13, 2009 at 10:06:09AM +0100, St?phane MERLE wrote:

>> This logs the delivery of a bounce message that is "returned to the
>> sender".
>>   
> I just saw that those mail are sent to n...@localhost :
>
> 8652C2E741C6: to=, orig_to=, 
> relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced 
> (unknown user: "null")
>
> surely because I set : bounce_notice_recipient = null
> in main.cf

No, the "orig_to" tells us that the mail was addressed to
"john@distdomain.com", and rewritten to "n...@localhost" via
canonical_maps or virtual_alias_maps (more likely the latter).

Such a rewrite seems unwise...

-- 
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: status during email life ...

2009-11-13 Thread Stéphane MERLE



I will not post instructions to throw away non-delivery notices.
I know that people would mis-use this to cover up their mistakes
so that their users don't find out that mail was mis-handled.

If you have a specialized need that never needs to deliver NDRs,
then it is easy enough to edit the Postfix SMTP client source code
and change the SMTP_STATE_DOT reply handler so that it skips the
server reply code test.

Wietse
  


You're probably right, I will not edit the source code, too much work to 
spraid the change over all the servers and to keep them updated. I will 
just keep using the NULL, thanks for your help anyway.


Stéphane




Re: status during email life ...

2009-11-13 Thread Wietse Venema
St?phane MERLE:
> Wietse Venema a ?crit :
> > Sorry, that is NOT a good reason to throw away rejected mail.
> >
> > When non-spam mail is rejected, the sender needs to know. It is
> > up to the sender to deal with this, not the MTA operator.
> >
> > When people are sending real spam to hotmail, then silencing Postfix
> > is not the proper solution.
> >
> > Wietse
> >   
> Ok, I just get what you meant, here, the sender is a robot, those smtp 
> server are use for mass mailing (subscription mailing like horoscope or 
> daily recipe), so I don't need an actual email to know that a mail is 
> bounced or expired. I am dealing directly with the postfix log files to 
> get this and to react on the database. This is why I'd like to "cancel" 
> the notification message. But I do understand perfectly that the MTA 
> have to send the notification most of the time, because people who sent 
> mail need to know that the mail is wrong or rejected.
> I am sorry, I should have made myself clearer from the beginning.

I will not post instructions to throw away non-delivery notices.
I know that people would mis-use this to cover up their mistakes
so that their users don't find out that mail was mis-handled.

If you have a specialized need that never needs to deliver NDRs,
then it is easy enough to edit the Postfix SMTP client source code
and change the SMTP_STATE_DOT reply handler so that it skips the
server reply code test.

Wietse


Re: status during email life ...

2009-11-13 Thread Stéphane MERLE

Wietse Venema a écrit :

Sorry, that is NOT a good reason to throw away rejected mail.

When non-spam mail is rejected, the sender needs to know. It is
up to the sender to deal with this, not the MTA operator.

When people are sending real spam to hotmail, then silencing Postfix
is not the proper solution.

Wietse
  
Ok, I just get what you meant, here, the sender is a robot, those smtp 
server are use for mass mailing (subscription mailing like horoscope or 
daily recipe), so I don't need an actual email to know that a mail is 
bounced or expired. I am dealing directly with the postfix log files to 
get this and to react on the database. This is why I'd like to "cancel" 
the notification message. But I do understand perfectly that the MTA 
have to send the notification most of the time, because people who sent 
mail need to know that the mail is wrong or rejected.

I am sorry, I should have made myself clearer from the beginning.

Thanks again for your patience.

Stéphane




Re: status during email life ...

2009-11-13 Thread Wietse Venema
St??phane MERLE:
> Hi,
> 
> Wietse Venema a ?crit :
> > St?phane MERLE:
> >   
> >> I just saw that those mail are sent to n...@localhost :
> >>
> >> 8652C2E741C6: to=, orig_to=, 
> >> relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced 
> >> (unknown user: "null")
> >>
> >> surely because I set : bounce_notice_recipient = null
> >> in main.cf
> >>
> >> how can I cancel any notification email ? (I am parsing the log files to 
> >> get those informations).
> >> 
> >
> > You don't delete bounce messages.
> >
> > Instead, you fix the problem that causes mail to bounce.
> >   
> Some bounce have no solution ...like spam (false) detection by hotmail 

Sorry, that is NOT a good reason to throw away rejected mail.

When non-spam mail is rejected, the sender needs to know. It is
up to the sender to deal with this, not the MTA operator.

When people are sending real spam to hotmail, then silencing Postfix
is not the proper solution.

Wietse


Re: status during email life ...

2009-11-13 Thread Stéphane MERLE

Hi,

Wietse Venema a écrit :

St�phane MERLE:
  

I just saw that those mail are sent to n...@localhost :

8652C2E741C6: to=, orig_to=, 
relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced 
(unknown user: "null")


surely because I set : bounce_notice_recipient = null
in main.cf

how can I cancel any notification email ? (I am parsing the log files to 
get those informations).



You don't delete bounce messages.

Instead, you fix the problem that causes mail to bounce.
  
Some bounce have no solution ...like spam (false) detection by hotmail 
(if I retry the same adress on an another server, with another ip, it go 
through most of the time ...) . And I don't want to delete a bounce 
message (especially in the logs) I just want to avoid to send an email 
to sender or null when a message is bounced or even expired  is that 
possible ?
because right now, the notification mail doesn't go out, but I assume 
that it takes some of the machine time 

Wietse
  


thanks for you help and patience 

Stéphane





Re: status during email life ...

2009-11-13 Thread Wietse Venema
St?phane MERLE:
> I just saw that those mail are sent to n...@localhost :
> 
> 8652C2E741C6: to=, orig_to=, 
> relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced 
> (unknown user: "null")
> 
> surely because I set : bounce_notice_recipient = null
> in main.cf
> 
> how can I cancel any notification email ? (I am parsing the log files to 
> get those informations).

You don't delete bounce messages.

Instead, you fix the problem that causes mail to bounce.

Wietse


Re: status during email life ...

2009-11-13 Thread Stéphane MERLE

Hi,

Victor Duchovni a écrit :
  2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: A323688C523: 
removed


  2009-11-12T10:59:33-0500 amnesiac postfix/smtp[29704]: 71FDF88C221:
to=, relay=mail.example.com[192.168.0.1]:25,
delay=0.15, delays=0.01/0/0.03/0.12, dsn=2.6.0, status=sent
(250 2.6.0 <20091112155933.71fdf88c...@amnesiac.example.com>
 Queued mail for delivery)
  
I don't get what this previous log is ... the mail is now sent but the 
lines before it, it was expired  (and it doesnt look like the 
notification mail, as it got the same "to").



This logs the delivery of a bounce message that is "returned to the
sender".
  

I just saw that those mail are sent to n...@localhost :

8652C2E741C6: to=, orig_to=, 
relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced 
(unknown user: "null")


surely because I set : bounce_notice_recipient = null
in main.cf

how can I cancel any notification email ? (I am parsing the log files to 
get those informations).


Thanks.

Stéphane





Re: status during email life ...

2009-11-12 Thread Victor Duchovni
On Thu, Nov 12, 2009 at 07:32:50PM +0100, St?phane MERLE wrote:

>> Note, this is logged by qmgr(8) not the smtp(8) delivery agent, perhaps
>> you are looking in the wrong log entries. If the message is (still) in
>> the deferred queue, it has not "expired" yet.
>
> Thank you so much, I was analysing the logs within the mysql table, and my 
> converter (log to bdd), didn't catch correctly the status for expired 
> because it is handle by qmgr and not smtp ... so I will correct my log2bdd 
> converter and this will be perfect.

Note, that qmgr(8) may also from time to time log "status=deferred"
messages, but, with sufficiently recent Postfix releases, this is rare
(the "retry" transport has to be "unavailable"). Modern Postfix releases
defer messages for "suspended" destinations via the "retry" transport
(i.e. the error(8) delivery agent):

2009-11-11T10:54:32-0500 amnesiac postfix/error[30129]: 5B07D88C666:
to=, relay=none, delay=6017,
delays=6017/0.01/0/0.03, dsn=4.4.1, status=deferred
(delivery temporarily suspended:
 connect to mail.example.com[192.0.2.1]:25: Connection timed out)

Older releases will do this via qmgr(8).

-- 
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: status during email life ...

2009-11-12 Thread Stéphane MERLE

Victor Duchovni a écrit :

On Thu, Nov 12, 2009 at 05:58:01PM +0100, St?phane MERLE wrote:

  

Victor Duchovni a ?crit :


On Thu, Nov 12, 2009 at 11:30:51AM +0100, St?phane MERLE wrote:

  
  
But then, what status get and email retried without success until the end 
? 


  2009-11-12T10:59:32-0500 amnesiac postfix/qmgr[1706]: A323688C523:
from=, size=385848, nrcpt=50 (queue active)

  2009-11-12T10:59:33-0500 amnesiac postfix/smtp[24820]: A323688C523:
to=, relay=none, delay=435330,
delays=435328/0/1.4/0, dsn=4.4.3, status=deferred
(Host or domain name not found. Name service error for 
name=example.net

 type=MX: Host not found, try again)

  2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: A323688C523:
from=, status=expired, returned to sender
  
I have no line in my logs with the "expired" status ... that would have 
solved my problem 



Note, this is logged by qmgr(8) not the smtp(8) delivery agent, perhaps
you are looking in the wrong log entries. If the message is (still) in
the deferred queue, it has not "expired" yet.
  
Thank you so much, I was analysing the logs within the mysql table, and 
my converter (log to bdd), didn't catch correctly the status for expired 
because it is handle by qmgr and not smtp ... so I will correct my 
log2bdd converter and this will be perfect.


Again you pointed me directly to the problem, thanks !

Stéphane
--





Re: status during email life ...

2009-11-12 Thread Victor Duchovni
On Thu, Nov 12, 2009 at 05:58:01PM +0100, St?phane MERLE wrote:

> Victor Duchovni a ?crit :
>> On Thu, Nov 12, 2009 at 11:30:51AM +0100, St?phane MERLE wrote:
>>
>>   
>>> But then, what status get and email retried without success until the end 
>>> ? 
>>
>>   2009-11-12T10:59:32-0500 amnesiac postfix/qmgr[1706]: A323688C523:
>> from=, size=385848, nrcpt=50 (queue active)
>>
>>   2009-11-12T10:59:33-0500 amnesiac postfix/smtp[24820]: A323688C523:
>> to=, relay=none, delay=435330,
>> delays=435328/0/1.4/0, dsn=4.4.3, status=deferred
>> (Host or domain name not found. Name service error for 
>> name=example.net
>>  type=MX: Host not found, try again)
>>
>>   2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: A323688C523:
>> from=, status=expired, returned to sender
>
> I have no line in my logs with the "expired" status ... that would have 
> solved my problem 

Note, this is logged by qmgr(8) not the smtp(8) delivery agent, perhaps
you are looking in the wrong log entries. If the message is (still) in
the deferred queue, it has not "expired" yet.

>>   2009-11-12T10:59:33-0500 amnesiac postfix/cleanup[31947]: 71FDF88C221:
>> message-id=<20091112155933.71fdf88c...@amnesiac.example.com>
>>
>>   2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: 71FDF88C221:
>> from=<>, size=4063, nrcpt=1 (queue active)
>>
>>   2009-11-12T10:59:33-0500 amnesiac postfix/bounce[32403]: A323688C523:
>> sender non-delivery notification: 71FDF88C221

The bounce(8) daemon (in reasonably recent Postfix releases) logs the
connection between the original queue-id and the bounce queue-id.

>>   2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: A323688C523: 
>> removed
>>
>>   2009-11-12T10:59:33-0500 amnesiac postfix/smtp[29704]: 71FDF88C221:
>> to=, relay=mail.example.com[192.168.0.1]:25,
>> delay=0.15, delays=0.01/0/0.03/0.12, dsn=2.6.0, status=sent
>> (250 2.6.0 <20091112155933.71fdf88c...@amnesiac.example.com>
>>  Queued mail for delivery)
>
> I don't get what this previous log is ... the mail is now sent but the 
> lines before it, it was expired  (and it doesnt look like the 
> notification mail, as it got the same "to").

This logs the delivery of a bounce message that is "returned to the
sender".

>>   2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: 71FDF88C221: 
>> removed

The original message can be removed, once the bounce message is queued
(and in some cases already delivered).

-- 
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: status during email life ...

2009-11-12 Thread Stéphane MERLE

Hi,

Victor Duchovni a écrit :

On Thu, Nov 12, 2009 at 11:30:51AM +0100, St?phane MERLE wrote:

  
But then, what status get and email retried without success until the end ? 



  2009-11-12T10:59:32-0500 amnesiac postfix/qmgr[1706]: A323688C523:
from=, size=385848, nrcpt=50 (queue active)

  2009-11-12T10:59:33-0500 amnesiac postfix/smtp[24820]: A323688C523:
to=, relay=none, delay=435330,
delays=435328/0/1.4/0, dsn=4.4.3, status=deferred
(Host or domain name not found. Name service error for name=example.net
 type=MX: Host not found, try again)

  2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: A323688C523:
from=, status=expired, returned to sender
  
I have no line in my logs with the "expired" status ... that would have 
solved my problem 



  2009-11-12T10:59:33-0500 amnesiac postfix/cleanup[31947]: 71FDF88C221:
message-id=<20091112155933.71fdf88c...@amnesiac.example.com>

  2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: 71FDF88C221:
from=<>, size=4063, nrcpt=1 (queue active)

  2009-11-12T10:59:33-0500 amnesiac postfix/bounce[32403]: A323688C523:
sender non-delivery notification: 71FDF88C221

  2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: A323688C523: removed

  2009-11-12T10:59:33-0500 amnesiac postfix/smtp[29704]: 71FDF88C221:
to=, relay=mail.example.com[192.168.0.1]:25,
delay=0.15, delays=0.01/0/0.03/0.12, dsn=2.6.0, status=sent
(250 2.6.0 <20091112155933.71fdf88c...@amnesiac.example.com>
 Queued mail for delivery)
  
I don't get what this previous log is ... the mail is now sent but the 
lines before it, it was expired  (and it doesnt look like the 
notification mail, as it got the same "to").

  2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: 71FDF88C221: removed

  


Thanks for your help in my understanding, and sorry for my poor english

Stéphane





Re: status during email life ...

2009-11-12 Thread Victor Duchovni
On Thu, Nov 12, 2009 at 11:30:51AM +0100, St?phane MERLE wrote:

> But then, what status get and email retried without success until the end ? 

  2009-11-12T10:59:32-0500 amnesiac postfix/qmgr[1706]: A323688C523:
from=, size=385848, nrcpt=50 (queue active)

  2009-11-12T10:59:33-0500 amnesiac postfix/smtp[24820]: A323688C523:
to=, relay=none, delay=435330,
delays=435328/0/1.4/0, dsn=4.4.3, status=deferred
(Host or domain name not found. Name service error for name=example.net
 type=MX: Host not found, try again)

  2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: A323688C523:
from=, status=expired, returned to sender

  2009-11-12T10:59:33-0500 amnesiac postfix/cleanup[31947]: 71FDF88C221:
message-id=<20091112155933.71fdf88c...@amnesiac.example.com>

  2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: 71FDF88C221:
from=<>, size=4063, nrcpt=1 (queue active)

  2009-11-12T10:59:33-0500 amnesiac postfix/bounce[32403]: A323688C523:
sender non-delivery notification: 71FDF88C221

  2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: A323688C523: removed

  2009-11-12T10:59:33-0500 amnesiac postfix/smtp[29704]: 71FDF88C221:
to=, relay=mail.example.com[192.168.0.1]:25,
delay=0.15, delays=0.01/0/0.03/0.12, dsn=2.6.0, status=sent
(250 2.6.0 <20091112155933.71fdf88c...@amnesiac.example.com>
 Queued mail for delivery)

  2009-11-12T10:59:33-0500 amnesiac postfix/qmgr[1706]: 71FDF88C221: removed

-- 
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.