Discussion:
$EXTENSION always empty?
(too old to reply)
Xavier Mertens
2022-05-11 05:48:28 UTC
Permalink
Hello,

New comer on this list and I hope to find some help...
I'm trying to configure my Postfix to use user+***@domain addresses.
A new separator has been configured, mail is accepted but $EXTENSION remains always empty. I'm using procmail like this:

mailbox_command = /usr/bin/procmail -a "$EXTENSION"

In my .procmailrc, I've:

EXT=$1

But, no luck! Always empty variable! Did I miss something? Tx!
Bob Nichols
2022-05-11 09:56:42 UTC
Permalink
Post by Xavier Mertens
A new separator has been configured,
What is the output of
postconf recipient_delimiter
?
--
Bob Nichols
(for e-mail remove .invalid)
Xavier Mertens
2022-05-11 12:53:04 UTC
Permalink
Here we go:

# postconf recipient_delimiter
recipient_delimiter = +

Nothing exotic :)

/x
Post by Bob Nichols
Post by Xavier Mertens
A new separator has been configured,
What is the output of
postconf recipient_delimiter
?
--
Bob Nichols
(for e-mail remove .invalid)
Bob Nichols
2022-05-11 19:56:03 UTC
Permalink
Post by Xavier Mertens
# postconf recipient_delimiter
recipient_delimiter = +
Okay, that's fine.

My next guess is that Postfix is rewriting the sender address before
passing the message on to procmail. Do you have an example of the log
messages for such a mail? Ideally from both Postfix and Procmail for the
same message. (Feel free to obfuscate any host names or IP addresses, so
long as the form of the email address is still visible.)
--
Bob Nichols
(for e-mail remove .invalid)
Bob Nichols
2022-05-11 20:06:24 UTC
Permalink
My next guess is that Postfix is rewriting the sender address ...
Oops! that should of course read "rewriting the recipient address".
--
Bob Nichols
(for e-mail remove .invalid)
Xavier Mertens
2022-05-11 21:17:50 UTC
Permalink
Post by Bob Nichols
My next guess is that Postfix is rewriting the sender address ...
Oops! that should of course read "rewriting the recipient address".
--
Bob Nichols
(for e-mail remove .invalid)
Here is an example:

May 10 22:32:56 marge postfix/local[27432]: 5A55027C0D3B: to=<***@domain.tld>, orig_to=<xavier+***@domain.tld>, relay=local, delay=1.9, delays=1.9/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION" -a "$EXTENSION")

It seems to be what you suggested if I interpret correctly the "to" and "orig_to"...

/x
Bob Nichols
2022-05-12 01:50:03 UTC
Permalink
Post by Xavier Mertens
relay=local, delay=1.9, delays=1.9/0.01/0/0.01, dsn=2.0.0,
status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION"
-a "$EXTENSION")
It seems to be what you suggested if I interpret correctly the "to" and "orig_to"...
Yes, it looks like that is behind the problem. Do you have any .forward
(or .forward+foo) files in place for this recipient? Or any matching
entries in your alias map? If so, could you temporarily remove/comment
them, and then see what Procmail sees?
--
Bob Nichols
(for e-mail remove .invalid)
Xavier Mertens
2022-05-12 11:14:22 UTC
Permalink
Post by Bob Nichols
Post by Xavier Mertens
relay=local, delay=1.9, delays=1.9/0.01/0/0.01, dsn=2.0.0,
status=sent (delivered to command: /usr/bin/procmail -a "$EXTENSION"
-a "$EXTENSION")
It seems to be what you suggested if I interpret correctly the "to" and "orig_to"...
Yes, it looks like that is behind the problem. Do you have any .forward
(or .forward+foo) files in place for this recipient? Or any matching
entries in your alias map? If so, could you temporarily remove/comment
them, and then see what Procmail sees?
--
Bob Nichols
(for e-mail remove .invalid)
No .forward but I'm using a virtual table:

***@domain.tld. xavier

I also have an alias in /etc/aliases:

xavier: ***@domain.tld
Bob Nichols
2022-05-12 13:37:11 UTC
Permalink
That should be fine, so long as the output of
postconf propagate_unmatched_extensions
contains "virtual" (which is the default).
I think that that alias is the culprit, though I don't understand what
it is intended to achieve. Is domain.tld here the same domain as that in
the virtual table above?
--
Bob Nichols
(for e-mail remove .invalid)
Xavier Mertens
2022-05-13 13:34:47 UTC
Permalink
Post by Bob Nichols
That should be fine, so long as the output of
postconf propagate_unmatched_extensions
contains "virtual" (which is the default).
I think that that alias is the culprit, though I don't understand what
it is intended to achieve. Is domain.tld here the same domain as that in
the virtual table above?
--
Bob Nichols
(for e-mail remove .invalid)
I removed the line from /etc/aliases (followed by a "newalias"), tested again and... it worked!
Tx for your help!
Bob Nichols
2022-05-13 16:51:52 UTC
Permalink
Post by Xavier Mertens
I removed the line from /etc/aliases (followed by a "newalias"), tested again and... it worked!
Tx for your help!
That's good news! (and on Friday 13th, no less)
I'm glad if my suggestions helped.
--
Bob Nichols
(for e-mail remove .invalid)
Loading...