Skip to Content.
Sympa Menu

en - Re: [sympa-users] postfix virtual aliases problem

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Liam Kirsher <address@concealed>
  • To: address@concealed, address@concealed
  • Subject: Re: [sympa-users] postfix virtual aliases problem
  • Date: Wed, 26 Jul 2006 11:07:00 -0700

These regexp rules should be:
/^lists\.visionsoft\.hu$/                                       xxx
/^(postmaster|root|abuse|sympa-request)@lists\.visionsoft\.hu$/ $address@concealed
/^(tesztlista|test|sales|sales2)-(request|editor|owner|subscribe|unsubscribe)@lists\.visionsoft\.hu$/   visionsoft-$2+$1
/^(tesztlista|test|sales|sales2)@lists\.visionsoft\.hu$/        visionsoft+$1

That should expand address@concealed to visionsoft+tesztlista.  Then that address is found in the aliases file.

You also need to have these local aliases:

visionsoft: "| /home/sympa/bin/queue $address@concealed"
visionsoft-request: "| /home/sympa/bin/queue $address@concealed"
visionsoft-editor: "| /home/sympa/bin/queue $address@concealed"
visionsoft-owner: "| /home/sympa/bin/bouncequeue $address@concealed"
visionsoft-subscribe: "| /home/sympa/bin/queue $address@concealed"
visionsoft-unsubscribe: "| /home/sympa/bin/queue $address@concealed"

I put that in my standard aliases file, you have it in a mysql alias table.   If that were missing, it would explain the delivery failure.
In this example I'm just piping directly to sympa programs, and that would probably work for you.  There is probably some way to use the sympa transport you have set up, I'm not sure exactly how to do that.  Something to do with mailbox_transport_maps, perhaps?  In any case, it should be relatively simple to set up the local alias. You can test by sending mail locally --
/bin/mail -v -s "test" visionsoft+tesztlista


Mailbox delivery can be delegated to  alternative  message
       transports  specified  in  the  master.cf file.  The mail-
       box_transport_maps  and  mailbox_transport   configuration
       parameters  specify  an optional message transport that is
       to be used for all local recipients, regardless of whether
       they  are  found  in  the UNIX passwd database.  The fall-
       back_transport_maps  and   fallback_transport   parameters
       specify  an optional message transport for recipients that
       are not found in the aliases(5) or UNIX passwd database.



Good luck,
Liam

At 10:54 AM 7/26/2006 +0200, you wrote:
Morning!

:( yes i tried the configuration what you sent:

my maillog:

Jul 26 10:56:02 localhost postfix/pickup[27392]: 53173143C6: uid=1004 from=<address@concealed>
Jul 26 10:56:02 localhost postfix/cleanup[27408]: 53173143C6: message-id=<address@concealed>
Jul 26 10:56:02 localhost postfix/qmgr[27393]: 53173143C6: from=<address@concealed>, size=458, nrcpt=1 (queue active)
Jul 26 10:56:02 localhost amavis[26610]: (26610-05) ESMTP::10024 /var/lib/amavis/amavis-20060726T102226-26610:
<address@concealed> -> <address@concealed> Received: SIZE=458 BODY=8BITMIME from vision-software.hu
([127.0.0.1]) by localhost (visionsoft.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26610-05 for
<address@concealed>; Wed, 26 Jul 2006 10:56:02 +0200 (CEST)
Jul 26 10:56:02 localhost amavis[26610]: (26610-05) Checking: <address@concealed> -> <address@concealed>
Jul 26 10:56:02 localhost amavis[26610]: (26610-05) lookup_sql_field(spam_tag_level) (WARNING: no such field in the SQL table),
"address@concealed" matches, result=undef
Jul 26 10:56:02 localhost amavis[26610]: (26610-05) lookup_sql_field(spam_tag2_level) (WARNING: no such field in the SQL table),
"address@concealed" matches, result=undef
Jul 26 10:56:02 localhost amavis[26610]: (26610-05) lookup_sql_field(spam_kill_level) (WARNING: no such field in the SQL table),
"address@concealed" matches, result=undef
Jul 26 10:56:02 localhost amavis[26610]: (26610-05) FWD via SMTP: [127.0.0.1]:10025 <address@concealed> ->
<address@concealed>
Jul 26 10:56:02 localhost postfix/smtpd[27414]: connect from localhost[127.0.0.1]
Jul 26 10:56:02 localhost postfix/smtpd[27414]: 69CE9143C3: client=localhost[127.0.0.1]
Jul 26 10:56:02 localhost postfix/cleanup[27408]: 69CE9143C3: message-id=<address@concealed>
Jul 26 10:56:02 localhost postfix/qmgr[27393]: 69CE9143C3: from=<address@concealed>, size=932, nrcpt=1 (queue active)
Jul 26 10:56:02 localhost postfix/smtpd[27414]: disconnect from localhost[127.0.0.1]
Jul 26 10:56:02 localhost amavis[26610]: (26610-05) Passed, <address@concealed> -> <address@concealed>,
Message-ID: <address@concealed>, Hits: -
Jul 26 10:56:02 localhost amavis[26610]: (26610-05) TIMING [total 127 ms] - SMTP EHLO: 1 (1%), SMTP pre-MAIL: 0 (0%), SMTP
pre-DATA-flush: 1 (1%), SMTP DATA: 37 (29%), body hash: 0 (0%), lookup_sql: 1 (1%), mime_decode: 5 (4%), get-file-type: 9 (7%),
decompose_part: 1 (1%), parts: 0 (0%), AV-scan-1: 1 (1%), fwd-connect: 9 (7%), fwd-mail-from: 2 (2%), fwd-rcpt-to: 2 (1%),
write-header: 2 (2%), fwd-data: 0 (0%), fwd-data-end: 51 (40%), fwd-rundown: 1 (1%), unlink-1-files: 2 (2%), rundown: 0 (0%)
Jul 26 10:56:02 localhost postfix/smtp[27411]: 53173143C6: to=<address@concealed>, relay=127.0.0.1[127.0.0.1],
delay=0, status=sent (250 2.6.0 Ok, id=26610-05, from MTA: 250 Ok: queued as 69CE9143C3)
Jul 26 10:56:02 localhost postfix/qmgr[27393]: 53173143C6: removed
Jul 26 10:56:02 localhost postfix/virtual[27418]: 69CE9143C3: to=<address@concealed>, relay=virtual, delay=0,
status=bounced (unknown user: "address@concealed")
Jul 26 10:56:02 localhost postfix/cleanup[27408]: 7CC6E143C7: message-id=<address@concealed>
Jul 26 10:56:02 localhost postfix/qmgr[27393]: 7CC6E143C7: from=<>, size=2730, nrcpt=1 (queue active)
Jul 26 10:56:02 localhost postfix/qmgr[27393]: 69CE9143C3: removed
Jul 26 10:56:02 localhost postfix/virtual[27418]: 7CC6E143C7: to=<address@concealed>, relay=virtual, delay=0,
status=bounced (unknown user: "address@concealed")
Jul 26 10:56:02 localhost postfix/qmgr[27393]: 7CC6E143C7: removed

my bounced mail:

This is the Postfix program at host vision-software.hu.
I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can delete your own text from the attached returned message.

                        The Postfix program

<address@concealed> (expanded from
    <address@concealed>): unknown user:
    "address@concealed"


my virtual.regexp: (4 rows)

/^lists\.visionsoft\.hu$/                                       xxx
/^(postmaster|root|abuse|sympa-request)@lists\.visionsoft\.hu$/ $address@concealed
/^(tesztlista|test|sales|sales2)-(request|editor|owner|subscribe|unsubscribe)@lists\.visionsoft\.hu$/   lists.visionsoft.hu-$2+$1
/^(tesztlista|test|sales|sales2)@lists\.visionsoft\.hu$/        visionsoft.hu+$1

my transport_regexp:

/^.*+owner\@lists\.visionsoft\.hu$/     sympabounce:
/^.*\@lists\.visionsoft\.hu$/   sympa:

my master.cf last 2 rows:

sympa     unix  -       n       n       -       -       pipe flags=qhu user=sympa argv=/home/sympa/bin/queue ${recipient}
sympabounce     unix  -       n       n       -       -       pipe flags=qhu user=sympa argv=/home/sympa/bin/bouncequeue
${recipient}

my main.cf:

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
smtpd_banner = vision-software
mail_owner = postfix
myhostname = vision-software.hu
myip = 195.228.74.109
mynetworks = 127.0.0.0/8, 195.228.74.109
mydomain = vision-software.hu
myorigin = $mydomain
mydestination = $mydomain, $myip, mx.$mydomain, $transport_maps
alias_maps = hash:/etc/aliases
#mailbox_command = procmail -a "$EXTENSION"
relay_domains = $mydestination, $virtual_maps, $mynetworks
local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 10
debug_peer_level = 2
debugger_command =
         PATH=/usr/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5
program_directory = /usr/lib/postfix

message_size_limit = 62914560
mailbox_size_limit = 70000000
virtual_mailbox_limit = 70000000
virtual_mailbox_base = /mail/

virtual_alias_maps = mysql:/etc/postfix/alias.cf,regexp:/etc/postfix/virtual.regexp
recipient_delimiter = +
virtual_mailbox_maps = mysql:/etc/postfix/mailbox.cf
transport_maps = mysql:/etc/postfix/domains.cf,regexp:/etc/postfix/transport.regexp

virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/quotas.cf
virtual_mailbox_limit_override = yes
virtual_mailbox_limit_message = "A felhasznalonak megtelt a postafiokja."
virtual_overquota_bounce = yes

sympa_destination_recipient_limit = 1
sympabounce_destination_recipient_limit = 1

virtual_uid_maps = static:65534
virtual_gid_maps = static:65534

content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings

home_mailbox = Maildir/

smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes

smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_non_fqdn_recipient,reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file= /etc/postfix/smtpd.cert
smtpd_tls_key_file= /etc/postfix/smtpd.key

#smtpd_client_restrictions = check_client_access = hash:/var/lib/pop-before-smtp/hosts
unknown_local_recipient_reject_code = 450
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
html_directory = no
setgid_group = postdrop
manpage_directory = /usr/local/man
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq




> Balazs,
>
> If you don't want to run postmap (or, actually, postfix reload) every time
> you create a list, then put in virtual.regexp:
> /^(.*)@virtualdomain\.org$/ $1-virtualdomain\.org
>
> Plus the other aliases and regexps in my previous message.
>
> That's convenient... however, it means address@concealed will get
> sent to sympa.  Because Spammers often try random common names at a domain,
> you will receive a lot of spam, and sympa will respond by sending a "list
> not available" message.  Then, probably, that message will bounce because
> the spammer is using a bogus account.  So you will have another bounce
> coming back at you.
>
> In order to limit spam, I use a specific list name instead of wild card, as in:
> /^(specific_list_name)@virtualdomain\.org$/ virtualdomain+$1
>
> Did you try the configuration I sent previously?  What happened?
>
> Liam
>
> http://www.postfix.org/VERP_README.html
>
>
>
> At 10:54 AM 7/25/2006 +0200, you wrote:
>>Hi Listmasters!
>>
>>I am configuring sympa-5.2.1 now, but i don't understand what i must to
>>set up if i use postfix with mysql (everyone stored in mysql database)
>>
>>I find that in README.postfix:
>>
>>2- Virtual domains management
>>
>>If you manage virtual robots with Sympa, then
>>with Postfix, add an entry to your /etc/postfix/virtual.regexp :
>>     /^(.*)my\.domain\.fr$/       ${1}-my.domain.fr
>>
>>Entries in the 'aliases' file will look like this :
>>     sympa-my.domain.fr:   "|/home/sympa/bin/sympa.pl address@concealed"
>>     .....
>>     listA-my.domain.fr:   "|/home/sympa/bin/sympa.pl address@concealed"
>>
>>This way you don't need to run 'postmap' everytime you create a list
>>
>>
>>Is this say that:
>>
>>I have to add an entry to main.cf -> virtual_aliases_maps =
>>regexp:/etc/postfix/virtual.regexp
>>
>>And I have to add an entry to /etc/postfix/virtual.regexp:
>>
>>     /^(.*)visionhost.hu$/       ${1}-visionhost.hu
>>
>>Or
>>
>>     /^(.*)visionhost\.hu$/       ${1}-visionhost.hu
>>
>>?
>>
>>Sincerely
>>
>>Balazs IVANCSIK
>
> Liam Kirsher <liamk/AT/numenet/DOT/com>
> 415-456-4420
> 415-438-0384 (cell)
> PGP: http://liam.numenet.com/pgp/
>
>
>

Liam Kirsher <liamk/AT/numenet/DOT/com>
415-456-4420
415-438-0384 (cell)
PGP: http://liam.numenet.com/pgp/




Archive powered by MHonArc 2.6.19+.

Top of Page