How to bounce malformed addresses ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to bounce malformed addresses ?

florent
Hi everyone,

I run some mass-mailing servers with Postfix 2.11.3.

I have some messages being deferred because of malformed addresses like
"[hidden email]" ("gmail.co" instead of "gmail.com").

These messages stays a few days in queue and get removed then.

But no bounce is returned to the sender !

I have bounces from others servers like "user does not exist" but never
bounces for such addresses.

Is it the way Postfix is supposed to run ? How can I do to get bounces
for these messages ?

Thank you a lot.

Florent
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to bounce malformed addresses ?

Wietse Venema
[hidden email]:
> Hi everyone,
>
> I run some mass-mailing servers with Postfix 2.11.3.
>
> I have some messages being deferred because of malformed addresses like
> "[hidden email]" ("gmail.co" instead of "gmail.com").
>
> These messages stays a few days in queue and get removed then.

What removes those messages?

> But no bounce is returned to the sender !

Because something other than Postfix removes the messages?

> I have bounces from others servers like "user does not exist" but never
> bounces for such addresses.
>
> Is it the way Postfix is supposed to run ? How can I do to get bounces
> for these messages ?

TO REPORT A PROBLEM see http://www.postfix.org/DEBUG_README.html#mail

TO (UN)SUBSCRIBE see http://www.postfix.org/lists.html

Thank you for using Postfix.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to bounce malformed addresses ?

Noel Jones-2
In reply to this post by florent
On 6/8/2017 8:53 AM, [hidden email] wrote:
> Hi everyone,
>
> I run some mass-mailing servers with Postfix 2.11.3.
>
> I have some messages being deferred because of malformed addresses
> like "[hidden email]" ("gmail.co" instead of "gmail.com").

gmail.co exists, but does not answer on port 25.  Postfix correctly
treats this as a temporary error and will return the mail to sender
after $maximal_queue_lifetime.  From postfix's point of view, this
is indistinguishable from a domain that is temporarily offline.

>
> These messages stays a few days in queue and get removed then.

What removed the message???  Check the logs.  Postfix will attempt
to return the message but if that fails the message will be lost.
If there is nothing logged, then some external process removed the
message from the queue.

We handle these typo domains by adding some commonly misspelled
domains to the transport table.

# transport
...
# some common misspellings that don't accept mail
aol.cm  error:5.1.2 maybe you mean aol.com
gmail.org error:5.1.2 maybe you mean gmail.com
gmail.co error:5.1.2 maybe you mean gmail.com
gmaill.com error:5.1.2 maybe you mean gmail.com
jmail.com error:5.1.2 domain jmail.com not valid
yahoo.co  error:5.1.2 maybe you mean yahoo.com






  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to bounce malformed addresses ?

florent
Hi,

On 2017-06-08 17:58, Noel Jones wrote:

> On 6/8/2017 8:53 AM, [hidden email] wrote:
>> Hi everyone,
>>
>> I run some mass-mailing servers with Postfix 2.11.3.
>>
>> I have some messages being deferred because of malformed addresses
>> like "[hidden email]" ("gmail.co" instead of "gmail.com").
>
> gmail.co exists, but does not answer on port 25.  Postfix correctly
> treats this as a temporary error and will return the mail to sender
> after $maximal_queue_lifetime.  From postfix's point of view, this
> is indistinguishable from a domain that is temporarily offline.

That's the point, sender never gets notified about non-delivery.

I checked my config and see that I never had
"reject_unknown_recipient_domain" in my restrictions. Could it be the
cause ?

I added it and will see what's going on after 5 days of queuing.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to bounce malformed addresses ?

Noel Jones-2
On 6/12/2017 9:59 AM, [hidden email] wrote:

> Hi,
>
> On 2017-06-08 17:58, Noel Jones wrote:
>> On 6/8/2017 8:53 AM, [hidden email] wrote:
>>> Hi everyone,
>>>
>>> I run some mass-mailing servers with Postfix 2.11.3.
>>>
>>> I have some messages being deferred because of malformed addresses
>>> like "[hidden email]" ("gmail.co" instead of "gmail.com").
>>
>> gmail.co exists, but does not answer on port 25.  Postfix correctly
>> treats this as a temporary error and will return the mail to sender
>> after $maximal_queue_lifetime.  From postfix's point of view, this
>> is indistinguishable from a domain that is temporarily offline.
>
> That's the point, sender never gets notified about non-delivery.
>
> I checked my config and see that I never had
> "reject_unknown_recipient_domain" in my restrictions. Could it be
> the cause ?
>
> I added it and will see what's going on after 5 days of queuing.

Using reject_unknown_recipient_domain will have no effect on domains
that exist but don't accept mail, such as "gmail.co".

Postfix will return undeliverable mail to the envelope sender
address.  The envelope sender is not necessarily the same as the
From: header.  The envelope sender is recorded in the postfix log.

If the mail is not returned as expected, check the postfix logs.
Postfix goes to great effort to always record what happens to mail.



  -- Noel Jones
Loading...