Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

rewrite orig_to=<postmaster>

1,144 views
Skip to first unread message

LLogicoss

unread,
Oct 11, 2008, 7:04:58 PM10/11/08
to
Hi,

How rewrite "postmaster" to "postmaster@mydomain" ?

Because, "mx1.free.fr" reject "orig_to=<postmaster>"

Log info:

"... postfix/smtp[4768]: BC4F742A7: to=<my_e...@free.fr>,
orig_to=<postmaster>, relay=mx1.free.fr[212.27.48.7]:25, delay=0.35,
delays=0.01/0/0.28/0.06, dsn=5.0.0, status=bounced host
mx1.free.fr[212.27.48.7] said: 553 sorry, your envelope sender domain
must exist (#5.7.1) (in reply to MAIL FROM command)"

I have try a lot of
"canonical_maps","smtp_generic_maps","local_header_rewrite" and so on,
but nothing seems to work for changing this "orig_to=...".

A+

--
c'est pas moi

Martin Gregorie

unread,
Oct 12, 2008, 4:28:44 AM10/12/08
to
On Sun, 12 Oct 2008 01:04:58 +0200, LLogicoss wrote:

> Hi,
>
> How rewrite "postmaster" to "postmaster@mydomain" ?
>
> Because, "mx1.free.fr" reject "orig_to=<postmaster>"
>

mydomain defaults to the domain name in the hostname, so
do at least one of the following:

a) set the computer's hostname to the full dotted form:
myhost.example.com

b) explicitly set mydomain (mydomain = example.com).


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |

LLogicoss

unread,
Oct 12, 2008, 4:46:24 PM10/12/08
to
Martin Gregorie a écrit :

> mydomain defaults to the domain name in the hostname, so
> do at least one of the following:
>
> a) set the computer's hostname to the full dotted form:
> myhost.example.com
>
> b) explicitly set mydomain (mydomain = example.com).


I have already some "rewrite rule" , and it works.
"$mydomain" seems good.

But, this "postmaster" message is auto-generate by postfix (after some
minors errors).
This message is rejected by the MX of Free.fr .

I would like to change "orig_to=<postmaster>" to
"orig_to=<postmaster@my_domain_somewhere_on_earth>"


Thank

Matthias Watermann

unread,
Oct 13, 2008, 6:22:01 AM10/13/08
to
On Sun, 12 Oct 2008 01:04:58 +0200, LLogicoss wrote:

> How rewrite "postmaster" to "postmaster@mydomain" ?

You don't want that (see below).
About how, anyway, see you local alias file.

> Because, "mx1.free.fr" reject "orig_to=<postmaster>"

No, read carefully:

> Log info:
>
> "... postfix/smtp[4768]: BC4F742A7: to=<my_e...@free.fr>,
> orig_to=<postmaster>, relay=mx1.free.fr[212.27.48.7]:25, delay=0.35,
> delays=0.01/0/0.28/0.06, dsn=5.0.0, status=bounced host
> mx1.free.fr[212.27.48.7] said: 553 sorry, your envelope sender domain
> must exist (#5.7.1) (in reply to MAIL FROM command)"

The problem is: "your envelope sender domain must exist". This may be
caused by (a) a wrong setup of your host's domain name or (b) in case
of a forwarded message an envelope from which is forged (usually
SPAM which your MTA should have rejected in the first place).

To investigate further you should check where the message in question
originated: Was it a locally generated mail or was it a message your
MTA received from elsewhere and accepted regardless of the faked sender
address.

> I have try a lot of
> "canonical_maps","smtp_generic_maps","local_header_rewrite" and so on,
> but nothing seems to work for changing this "orig_to=...".

Forget about that: Your problem _not_ "orig_to". That value isn't even
sent to the remote server.


--
Matthias
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X - AGAINST M$ ATTACHMENTS
/ \

LLogicoss

unread,
Oct 13, 2008, 4:17:22 PM10/13/08
to
LLogicoss a écrit :

> Hi,
>
> How rewrite "postmaster" to "postmaster@mydomain" ?
>
> Because, "mx1.free.fr" reject "orig_to=<postmaster>"
>
> Log info:
>
> "... postfix/smtp[4768]: BC4F742A7: to=<my_e...@free.fr>,
> orig_to=<postmaster>, relay=mx1.free.fr[212.27.48.7]:25, delay=0.35,
> delays=0.01/0/0.28/0.06, dsn=5.0.0, status=bounced host
> mx1.free.fr[212.27.48.7] said: 553 sorry, your envelope sender domain
> must exist (#5.7.1) (in reply to MAIL FROM command)"

Now, it's work fine:

in 'main.cf' file , there had:
myhostname = smtp.mylocaldomain.local
smtp_generic_maps = hash:/etc/postfix/generic

in 'generic' file, I have forgot this line:
@smtp.mylocaldomain.local @mypublicdomain.fr

So now, when postfix create a "MAILER DAEMON" message, it rewrote
'postm...@smtp.mylocaldomain.local' into 'postm...@mypublicdomain.fr'.

And "mx1.free.fr" is happy.

Thank's to all.

Matthias Watermann

unread,
Oct 14, 2008, 3:09:08 AM10/14/08
to
On Mon, 13 Oct 2008 22:17:22 +0200, LLogicoss wrote:

> LLogicoss a écrit :
>> Hi,
>>
>> How rewrite "postmaster" to "postmaster@mydomain" ?
>>
>> Because, "mx1.free.fr" reject "orig_to=<postmaster>"

No, that's a wrong interpretation of the error message:

>> Log info:
>>
>> "... postfix/smtp[4768]: BC4F742A7: to=<my_e...@free.fr>,
>> orig_to=<postmaster>, relay=mx1.free.fr[212.27.48.7]:25, delay=0.35,
>> delays=0.01/0/0.28/0.06, dsn=5.0.0, status=bounced host
>> mx1.free.fr[212.27.48.7] said: 553 sorry, your envelope sender domain
>> must exist (#5.7.1) (in reply to MAIL FROM command)"
>
> Now, it's work fine:
>
> in 'main.cf' file , there had:
> myhostname = smtp.mylocaldomain.local smtp_generic_maps =
> hash:/etc/postfix/generic
>
> in 'generic' file, I have forgot this line:
> @smtp.mylocaldomain.local @mypublicdomain.fr

Why do you want to setup an invalid hostname ("smtp.mylocaldomain.local")
first and replace it later to the valid one ("mypublicdomain.fr") instead
of setting the correct name in the first place?

Just setup the correct "myhostname" value and forget about any rewriting.
Introducing wrong values just to be able to correct them later doesn't
make much sense after all.

> So now, when postfix create a "MAILER DAEMON" message, it rewrote
> 'postm...@smtp.mylocaldomain.local' into
> 'postm...@mypublicdomain.fr'.

Please note that the configured hostname is used not only by the
MAILERDAEMON messages but by _all_ locally generated mails.

0 new messages