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

Using VERP on Postfix server

393 views
Skip to first unread message

Reuben (Plexus IT)

unread,
Aug 31, 2010, 6:37:13 AM8/31/10
to

Hey All,

 

I am trying to use email sub addressing (VERP) on my Postfix server. To do this I should be able to add tag to an email address return+tag=bob...@give2partners.org and still receive the email to ret...@give2partners.org.

I have activated the following in postfix main.cf file according to
http://www.postfix.org/VERP_README.html:
recipient_delimiter = +

forward_path = $home/.forward${recipient_delimiter}${extension}, $home/.forward

propagate_unmatched_extensions = canonical, virtual

But when I send an email to return+tag=bob...@give2partners.org it just disappears and does not give a bounce or anything. Can you point me in the direction of what I am doing wrong in my configuration.

 

I am running Postfix 2.3.3-2.1.el5_2 on a Parallels Plesk run server.

 

Thanks

 

Reubs

 

Below is the output from postconf -n:

 

alias_database = hash:/etc/aliases

alias_maps = hash:/etc/aliases, hash:/var/spool/postfix/plesk/aliases

command_directory = /usr/sbin

config_directory = /etc/postfix

daemon_directory = /usr/libexec/postfix

debug_peer_level = 2

forward_path = $home/.forward${recipient_delimiter}${extension}, $home/.forward

html_directory = no

inet_interfaces = all

mail_owner = postfix

mailq_path = /usr/bin/mailq.postfix

manpage_directory = /usr/share/man

message_size_limit = 10240000

mydestination = localhost.$mydomain, localhost, localhost.localdomain

myhostname = host.plexusit.co.nz

mynetworks = 127.0.0.0/8, 74.204.185.59/32

newaliases_path = /usr/bin/newaliases.postfix

propagate_unmatched_extensions = canonical, virtual

queue_directory = /var/spool/postfix

readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES

recipient_delimiter = +

sample_directory = /usr/share/doc/postfix-2.3.3/samples

sendmail_path = /usr/sbin/sendmail.postfix

setgid_group = postdrop

smtp_send_xforward_command = yes

smtp_tls_security_level = may

smtp_use_tls = no

smtpd_authorized_xforward_hosts = 127.0.0.0/8

smtpd_client_restrictions =

smtpd_proxy_timeout = 3600s

smtpd_recipient_restrictions = permit_mynetworks, check_client_access pcre:/var/spool/postfix/plesk/no_relay.re, permit_sasl_authenticated, reject_unauth_destination

smtpd_sasl_auth_enable = yes

smtpd_sender_restrictions = check_sender_access hash:/var/spool/postfix/plesk/blacklists, permit_sasl_authenticated, check_client_access pcre:/var/spool/postfix/plesk/non_auth.re

smtpd_timeout = 3600s

smtpd_tls_CAfile = /etc/postfix/ssl/gd_bundle.crt

smtpd_tls_auth_only = yes

smtpd_tls_cert_file = /etc/postfix/ssl/mail.plexusit.co.nz.crt

smtpd_tls_key_file = /etc/postfix/ssl/mail.plexusit.co.nz.key

smtpd_tls_loglevel = 1

smtpd_tls_received_header = yes

smtpd_tls_security_level = may

smtpd_tls_session_cache_timeout = 3600s

smtpd_use_tls = yes

tls_random_source = dev:/dev/urandom

transport_maps = hash:/var/spool/postfix/plesk/transport

unknown_local_recipient_reject_code = 550

virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual

virtual_gid_maps = static:31

virtual_mailbox_base = /var/qmail/mailnames

virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains

virtual_mailbox_maps = hash:/var/spool/postfix/plesk/vmailbox

virtual_transport = plesk_virtual

virtual_uid_maps = static:110

Wietse Venema

unread,
Aug 31, 2010, 7:07:37 AM8/31/10
to
Reuben (Plexus IT):

> Hey All,
>
> I am trying to use email sub addressing (VERP) on my Postfix server. To do
> this I should be able to add tag to an email address
> return+tag=bob...@give2partners.org and still receive the email to
> <mailto:ret...@give2partners.org> ret...@give2partners.org.

>
> I have activated the following in postfix main.cf file according to
> http://www.postfix.org/VERP_README.html:
> recipient_delimiter = +
>
> forward_path = $home/.forward${recipient_delimiter}${extension},
> $home/.forward
>
> propagate_unmatched_extensions = canonical, virtual
>
> But when I send an email to return+tag=bob...@give2partners.org it just
> disappears and does not give a bounce or anything. Can you point me in the

Postfix mail does not disappear. Check your logs.

Wietse

Reuben (Plexus IT)

unread,
Sep 1, 2010, 6:19:26 AM9/1/10
to
Hey,

Here is the relevant part of the mail logs as far as I can tell. Would you
be able to help me understand what is happening to the email with my VERP
setup:

Sep 1 22:06:07 host before-queue[24095]: check handlers for addr:
reu...@gmail.com
Sep 1 22:06:07 host before-queue[24095]: check handlers for addr:
return+test=bob...@give2partners.org
Sep 1 22:06:07 host before-queue[24095]: Processing handlers...
Sep 1 22:06:07 host before-queue[24095]: hook_dir =
'/usr/local/psa/handlers/before-queue'
Sep 1 22:06:07 host before-queue[24095]: call_handlers: call executable =
'/usr/local/psa/handlers/info/10-spf-EVbieC/executable'
Sep 1 22:06:07 host spf filter[24101]: Starting spf filter...
Sep 1 22:06:08 host spf filter[24101]: SPF result: pass
Sep 1 22:06:08 host spf filter[24101]: SPF status: PASS
Sep 1 22:06:08 host before-queue[24095]: handlers_stderr: PASS
Sep 1 22:06:08 host before-queue[24095]: call_handlers: PASS during call
'/usr/local/psa/handlers/info/10-spf-EVbieC/executable' handler
Sep 1 22:06:08 host before-queue[24095]: recipient[3] =
'return+test=bob...@give2partners.org'
Sep 1 22:06:08 host before-queue[24095]: handlers dir =
'/usr/local/psa/handlers/before-queue/recipient/return+test=bob.com@give2par
tners.org'
Sep 1 22:06:08 host before-remote[24097]: check handlers for addr:
reu...@gmail.com
Sep 1 22:06:08 host before-remote[24097]: check handlers for addr:
return+test=bob...@give2partners.org
Sep 1 22:06:08 host postfix/cleanup[24100]: BE72CEA0255:
message-id=<AANLkTinz4-5Sr83p1MAUr...@mail.gmail.com>
Sep 1 22:06:08 host postfix/qmgr[16285]: BE72CEA0255:
from=<reu...@gmail.com>, size=2281, nrcpt=1 (queue active)
Sep 1 10:06:08 host postfix/smtpd[24098]: disconnect from
unknown[127.0.0.1]
Sep 1 22:06:08 host postfix-local[24106]: postfix-local:
from=reu...@gmail.com, to=return+test=bob...@give2partners.org,
dirname=/var/qmail/mailnames
Sep 1 22:06:08 host postfix-local[24106]: hook_dir =
'/usr/local/psa/handlers/before-local'
Sep 1 22:06:08 host postfix-local[24106]: recipient[3] =
'return+test=bob...@give2partners.org'
Sep 1 22:06:08 host postfix-local[24106]: handlers dir =
'/usr/local/psa/handlers/before-local/recipient/return+test=bob.com@give2par
tners.org'
Sep 1 22:06:08 host postfix-local[24106]: call_handlers: call executable =
'/usr/local/psa/handlers/info/10-dd52-domainkeys-3POSy3/executable'
Sep 1 22:06:08 host postfix-local[24106]: handlers_stderr: PASS
Sep 1 22:06:08 host postfix-local[24106]: call_handlers: PASS during call
'/usr/local/psa/handlers/info/10-dd52-domainkeys-3POSy3/executable' handler
Sep 1 22:06:08 host postfix-local[24106]: cannot chdir to mailname dir
return+test=bob.com: No such file or directory
Sep 1 22:06:08 host postfix-local[24106]: Unknown user:
return+test=bob...@give2partners.org
Sep 1 22:06:08 host postfix/pipe[17625]: BE72CEA0255:
to=<return+test=bob...@give2partners.org>, relay=plesk_virtual, delay=0.39,
delays=0.32/0/0/0.07, dsn=2.0.0, status=sent (delivered via plesk_virtual
service)
Sep 1 22:06:08 host postfix/qmgr[16285]: BE72CEA0255: removed


Thanks

Reubs

Reuben (Plexus IT)

unread,
Sep 1, 2010, 6:42:50 AM9/1/10
to

Wietse Venema

unread,
Sep 1, 2010, 8:25:13 AM9/1/10
to
Reuben (Plexus IT):

None the above logging is from Postfix.

> Sep 1 22:06:08 host postfix/cleanup[24100]: BE72CEA0255:
> message-id=<AANLkTinz4-5Sr83p1MAUr...@mail.gmail.com>
> Sep 1 22:06:08 host postfix/qmgr[16285]: BE72CEA0255:
> from=<reu...@gmail.com>, size=2281, nrcpt=1 (queue active)
> Sep 1 10:06:08 host postfix/smtpd[24098]: disconnect from
> unknown[127.0.0.1]

Apparently, Postfix received a message via SMTP from 127.0.0.1.

> Sep 1 22:06:08 host postfix-local[24106]: postfix-local:
> from=reu...@gmail.com, to=return+test=bob...@give2partners.org,
> dirname=/var/qmail/mailnames

That is not Postfix. I know this, because Postfix does not log
dirname information.

> Sep 1 22:06:08 host postfix-local[24106]: hook_dir =
> '/usr/local/psa/handlers/before-local'

That is not Postfix. I know this, because Postfix does not log
hook_dir information.

> Sep 1 22:06:08 host postfix-local[24106]: recipient[3] =
> 'return+test=bob...@give2partners.org'

That is not Postfix. I know this, because Postfix does not log
recipient[number] information.

> Sep 1 22:06:08 host postfix-local[24106]: handlers dir =
> '/usr/local/psa/handlers/before-local/recipient/return+test=bob.com@give2par
> tners.org'

That is not Postfix. I know this, because Postfix does not log
"handlers dir" information.

> Sep 1 22:06:08 host postfix-local[24106]: call_handlers: call executable =
> '/usr/local/psa/handlers/info/10-dd52-domainkeys-3POSy3/executable'

That is not Postfix. I know this, because Postfix does not log
call_handlers information.

> Sep 1 22:06:08 host postfix-local[24106]: handlers_stderr: PASS
> Sep 1 22:06:08 host postfix-local[24106]: call_handlers: PASS during call
> '/usr/local/psa/handlers/info/10-dd52-domainkeys-3POSy3/executable' handler
> Sep 1 22:06:08 host postfix-local[24106]: cannot chdir to mailname dir
> return+test=bob.com: No such file or directory

That is not Postfix. I know this, because Postfix does not log
"cannot chdir to mailname dir" messages.

> Sep 1 22:06:08 host postfix-local[24106]: Unknown user:
> return+test=bob...@give2partners.org

That is not Postfix.

mouss

unread,
Sep 1, 2010, 7:24:40 PM9/1/10
to
> Sep 1 22:06:08 host postfix/cleanup[24100]: BE72CEA0255:
> message-id=<AANLkTinz4-5Sr83p1MAUr...@mail.gmail.com>
> Sep 1 22:06:08 host postfix/qmgr[16285]: BE72CEA0255:
> from=<reu...@gmail.com>, size=2281, nrcpt=1 (queue active)
> Sep 1 10:06:08 host postfix/smtpd[24098]: disconnect from
> unknown[127.0.0.1]
> Sep 1 22:06:08 host postfix-local[24106]: postfix-local:
> from=reu...@gmail.com, to=return+test=bob...@give2partners.org,
> dirname=/var/qmail/mailnames
> Sep 1 22:06:08 host postfix-local[24106]: hook_dir =
> '/usr/local/psa/handlers/before-local'
> Sep 1 22:06:08 host postfix-local[24106]: recipient[3] =
> 'return+test=bob...@give2partners.org'
> Sep 1 22:06:08 host postfix-local[24106]: handlers dir =
> '/usr/local/psa/handlers/before-local/recipient/return+test=bob.com@give2par
> tners.org'
> Sep 1 22:06:08 host postfix-local[24106]: call_handlers: call executable =
> '/usr/local/psa/handlers/info/10-dd52-domainkeys-3POSy3/executable'
> Sep 1 22:06:08 host postfix-local[24106]: handlers_stderr: PASS
> Sep 1 22:06:08 host postfix-local[24106]: call_handlers: PASS during call
> '/usr/local/psa/handlers/info/10-dd52-domainkeys-3POSy3/executable' handler
> Sep 1 22:06:08 host postfix-local[24106]: cannot chdir to mailname dir
> return+test=bob.com: No such file or directory

call_handlers? are your running qmail?
what are these "postfix-local" and "spf filter" in your logs (the latter
breaks syslog format. don't put space in process names).

anyway, the log line above shows an error that you may want to fix.


> Sep 1 22:06:08 host postfix-local[24106]: Unknown user:
> return+test=bob...@give2partners.org

> Sep 1 22:06:08 host postfix/pipe[17625]: BE72CEA0255:
> to=<return+test=bob...@give2partners.org>, relay=plesk_virtual, delay=0.39,
> delays=0.32/0/0/0.07, dsn=2.0.0, status=sent (delivered via plesk_virtual
> service)

whatever program your exec from pipe is borked (returns OK when it fails).

Reuben (Plexus IT)

unread,
Sep 2, 2010, 5:05:27 AM9/2/10
to
So does anyone have any idea why VERP is not working on my postfix. Is it a
configuration problem?

Reubs

-----Original Message-----
From: owner-pos...@postfix.org
[mailto:owner-pos...@postfix.org] On Behalf Of mouss
Sent: Thursday, 2 September 2010 11:25 a.m.
To: Postfix Users
Subject: Re: Using VERP on Postfix server

mouss

unread,
Sep 2, 2010, 5:41:54 PM9/2/10
to
Le 02/09/2010 11:05, Reuben (Plexus IT) a écrit :
> So does anyone have any idea why VERP is not working on my postfix. Is it a
> configuration problem?
>


can you first reply/comment on what I said?

Reuben (Plexus IT)

unread,
Sep 6, 2010, 5:54:37 AM9/6/10
to
Hey,

let me brain dump all I know here. I am using an instance of Postfix that is
running on a server setup using Plesk control panel. From what I can make
out that means that means they have configured Postfix in a nonstandard way.
The reason that Qmail seems to appear is that originally Plesk only support
Qmail and when they implemented Postfix they retained /var/qmail/mailnames
as the email directory. Sorry I have no idea about the SPF stuff, seems to
be how postfix is setup on a Plesk server.

The reason that the chdir is not working is that there is no mail name
return+test=bob...@give2partners.org. I need it to strip the email so it
delivers it to ret...@give2partners.org address. Can you tell me what is
wrong with my VERP configuration that means this is not happening.

I have added the following to the configuration file according to
http://www.postfix.org/VERP_README.html:

recipient_delimiter = +
forward_path = $home/.forward${recipient_delimiter}${extension},
$home/.forward
propagate_unmatched_extensions = canonical, virtual

I appreciate any help.

Thanks

Wietse Venema

unread,
Sep 6, 2010, 8:41:17 AM9/6/10
to
Reuben (Plexus IT):

> Sep 1 22:06:08 host postfix-local[24106]: cannot chdir to mailname dir
> return+test=bob.com: No such file or directory
> Sep 1 22:06:08 host postfix-local[24106]: Unknown user:
> return+test=bob...@give2partners.org

Above, the plesk_virtual service can't find the user yet it reports
success to Postfix (next logfile record).

> Sep 1 22:06:08 host postfix/pipe[17625]: BE72CEA0255:
> to=<return+test=bob...@give2partners.org>, relay=plesk_virtual, delay=0.39,
> delays=0.32/0/0/0.07, dsn=2.0.0, status=sent (delivered via plesk_virtual
> service)

> Sep 1 22:06:08 host postfix/qmgr[16285]: BE72CEA0255: removed

The plesk_virtual service has returned "successful delivery" (process
exit status 0) to Postfix, therefore Postfix deletes the queue
file.

Instead, the plesk_virtual service should have returned "user
unknown" (process exit status 67) to Postfix. Process exit status
codes are defined in /usr/include/sysexits.h.

So you have two problems:

1) Making the plesk_virtual service recognize username with extension.

2) Making the plesk_virtual service return non-zero process exit status
numbers in case of error.

Wietse

mouss

unread,
Sep 6, 2010, 5:26:36 PM9/6/10
to
Le 06/09/2010 11:54, Reuben (Plexus IT) a écrit :
> Hey,
>
> let me brain dump all I know here. I am using an instance of Postfix that is
> running on a server setup using Plesk control panel. From what I can make
> out that means that means they have configured Postfix in a nonstandard way.
> The reason that Qmail seems to appear is that originally Plesk only support
> Qmail and when they implemented Postfix they retained /var/qmail/mailnames
> as the email directory.

the email directory is not the issue. your logs suggest that qmail is
being used.

> Sorry I have no idea about the SPF stuff, seems to
> be how postfix is setup on a Plesk server.
>
> The reason that the chdir is not working is that there is no mail name
> return+test=bob...@give2partners.org. I need it to strip the email so it
> delivers it to ret...@give2partners.org address.

with postfix, you do this with
recipient_delimiter = +

that's all you need with postfix. you need to check that your system is
using postfix and only postfix. mixing MTAs will only cause problems.

>> Sep 1 22:06:08 host postfix/qmgr[16285]: BE72CEA0255:

>> from=<reu...@gmail.com>, size=2281, nrcpt=1 (queue active)
>> Sep 1 10:06:08 host postfix/smtpd[24098]: disconnect from
>> unknown[127.0.0.1]
>> Sep 1 22:06:08 host postfix-local[24106]: postfix-local:
>> from=reu...@gmail.com, to=return+test=bob...@give2partners.org,
>> dirname=/var/qmail/mailnames
>> Sep 1 22:06:08 host postfix-local[24106]: hook_dir =
>> '/usr/local/psa/handlers/before-local'
>> Sep 1 22:06:08 host postfix-local[24106]: recipient[3] =
>> 'return+test=bob...@give2partners.org'
>> Sep 1 22:06:08 host postfix-local[24106]: handlers dir =
>>
> '/usr/local/psa/handlers/before-local/recipient/return+test=bob.com@give2par
>> tners.org'
>> Sep 1 22:06:08 host postfix-local[24106]: call_handlers: call executable
> =
>> '/usr/local/psa/handlers/info/10-dd52-domainkeys-3POSy3/executable'
>> Sep 1 22:06:08 host postfix-local[24106]: handlers_stderr: PASS
>> Sep 1 22:06:08 host postfix-local[24106]: call_handlers: PASS during call
>> '/usr/local/psa/handlers/info/10-dd52-domainkeys-3POSy3/executable'
> handler

>> Sep 1 22:06:08 host postfix-local[24106]: cannot chdir to mailname dir
>> return+test=bob.com: No such file or directory

> call_handlers? are your running qmail?
> what are these "postfix-local" and "spf filter" in your logs (the latter
> breaks syslog format. don't put space in process names).
>
> anyway, the log line above shows an error that you may want to fix.
>
>

>> Sep 1 22:06:08 host postfix-local[24106]: Unknown user:
>> return+test=bob...@give2partners.org

>> Sep 1 22:06:08 host postfix/pipe[17625]: BE72CEA0255:
>> to=<return+test=bob...@give2partners.org>, relay=plesk_virtual,
> delay=0.39,
>> delays=0.32/0/0/0.07, dsn=2.0.0, status=sent (delivered via plesk_virtual
>> service)

> whatever program your exec from pipe is borked (returns OK when it fails).
>

0 new messages