1

I have a problem on configuring Sympa.

I've created a new list new_test_list@example.com, but when I try to send mail to this list, I get an error in my maillog:

postfix/pipe[13544]: C699261227: to=new_test_list@example.com, relay=sympa, delay=0.33, delays=0.31/0.01/0/0.01, dsn=5.3.0, status=bounced (command line usage error. Command output: /home/sympa/bin/queue: usage error, one one list-name argument expected. ).

Can anybody tell me what command argument Sympa needs?

I have configured /etc/postfix/main.cf and /etc/postfix/master.cf. Every member that subscribed to this mailing list gets mail.

In /home/sympa/etc/sympa_aliases I have records about new lists:

new_test_list: "| /home/sympa/bin/queue new_test_list@example.com"
new_test_list-request: "| /home/sympa/bin/queue new_test_list-request@example.com"
new_test_list-editor: "| /home/sympa/bin/queue new_test_list-editor@example.com"
new_test_list-unsubscribe: "| /home/sympa/bin/queue new_test_list-unsubscribe@example.com"
new_test_list-owner: "| /home/sympa/bin/bouncequeue new_test_list@example.com"

postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases,hash:/home/sympa/etc/sympa_aliases
allow_percent_hack = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
myhostname = ns1.example.com
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relay_domains = $mydestination, lists.examle.com
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sender_bcc_maps = hash:/etc/postfix/bcc
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_bind_address = 10.0.1.10
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_recipient_restrictions =  permit_mynetworks permit_sasl_authenticated 
                                reject_unauth_destination 
                                check_policy_service unix:/var/spool/postfix/postgrey/socket
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = regexp:/home/sympa/etc/transport_regexp
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual

grep C699261227 /var/log/maillog

Mar 18 20:05:52 ns1 postfix/pickup[13491]: C699261227: uid=553 from=sympa@lists.example.com
Mar 18 20:05:52 ns1 postfix/cleanup[13515]: C699261227: message-id=sympa.1426709139.24806.779@lists.example.com
Mar 18 20:05:52 ns1 postfix/qmgr[9232]: C699261227: from=sympa@lists.example.com, size=438, nrcpt=1 (queue active)
Mar 18 20:05:52 ns1 postfix/pipe[13544]: C699261227: to=new_test_list@lists.example.com, relay=sympa, delay=0.33, delays=0.31/0.01/0/0.01, dsn=5.3.0, status=bounced (command line usage error. Command output: /home/sympa/bin/queue: usage error, one one list-name argument expected. )
Mar 18 20:05:52 ns1 postfix/bounce[13546]: C699261227: sender non-delivery notification: CCF93615E7
Mar 18 20:05:52 ns1 postfix/qmgr[9232]: C699261227: removed

cat /home/sympa/etc/transport_regexp

/^.*-owner\@lists\\.example\\.com$/ sympabounce:

/^.*\@lists\\.example\\.com$/       sympa:

/etc/postfix/master.cf

### Added for sympa
sympa   unix    -       n       n       -       -       pipe
  flags=R user=sympa argv=/home/sympa/bin/queue ${recipient}

sympabounce     unix    -       n       n       -       -       pipe
    flags=R user=sympa argv=/home/sympa/bin/bouncequeue ${recipient}
masegaloeh
  • 17,978
  • 9
  • 56
  • 104
user265247
  • 11
  • 4
  • Please post the output of `postconf -n` and `grep C699261227 mail.log` – masegaloeh Mar 19 '15 at 06:17
  • I've posted the output of this commands in my question, because I have a limit of characters in comment. – user265247 Mar 21 '15 at 15:32
  • what's the content of `/home/sympa/etc/transport_regexp` and `master.cf`? Please post it in the question – masegaloeh Mar 21 '15 at 15:42
  • Do you need all output of master.cf or only that I've added for Sympa? – user265247 Mar 21 '15 at 17:23
  • Are you sure the lines in `transport_regexp` is `/^.*\@lists\\.example\\.com$/ sympa:` not `/^.*\@lists\.example\.com$/ sympa:`??? – masegaloeh Mar 23 '15 at 07:26
  • line in transport_regexp is: /^.*\@lists\.example\.com$/ sympa: Sorry, when I typed this message, it is seen with one "\". – user265247 Mar 23 '15 at 09:25
  • Good. Can you try the little experiment in my answer below? `queue` program only [expect 1 or 2 parameter](http://www.sympa.org/distribution/current/src/queue.c). – masegaloeh Mar 23 '15 at 09:45
  • Yes, This line from my maillog: C9B8661C20: to=, relay=sympa, delay=0.33, delays=0.31/0.01/0/0.01, dsn=5.3.0, status=bounced (Command died with status 2: "/tmp/printargs.sh". Command output: args: new_test_list@lists.example.com ) – user265247 Mar 23 '15 at 11:27
  • Hmm it's expected result. If you send email to new_test_list, did you still get same error as before (sympa argument error)? – masegaloeh Mar 23 '15 at 11:51
  • It's work after your test. Magic. Thank you very much! Do you know what happened? – user265247 Mar 23 '15 at 12:02
  • Dunno, maybe you don't restart postfix after adding transport_maps. Maybe there are typo in your master.cf, especially in sympa service. Anyway congratulations – masegaloeh Mar 23 '15 at 12:20
  • Even though this question is already over a year old - there is also a bug in the main.cf on relay_domains = $mydestination, lists.examle.com - just in case someone copies the content ... – Yosh Mar 17 '16 at 10:28

1 Answers1

1

I've tried to reproduce your case, but I wasn't successful.

Based on your maillog lines

Mar 18 20:05:52 ns1 postfix/pipe[13544]: C699261227: to=new_test_list@lists.example.com, relay=sympa, delay=0.33, delays=0.31/0.01/0/0.01, dsn=5.3.0, status=bounced (command line usage error. Command output: /home/sympa/bin/queue: usage error, one one list-name argument expected. )

Postfix piped email to /home/sympa/bin/queue because of transport_maps parameter instead /home/sympa/etc/sympa_aliases.

To debug further you can do this step

  1. Create file /tmp/printargs.sh with content

    #!/bin/sh
    echo "args: $@"
    exit 2
    

    it will echo all arguments.

  2. Set appropriate permission

    chown sympa /tmp/printargs.sh
    chmod u+x /tmp/printargs.sh
    
  3. Change master.cf entry with

    sympa   unix    -       n       n       -       -       pipe
        flags=R user=sympa argv=/tmp/printargs.sh ${recipient}
    
  4. Restart postfix and see the maillog entry. In my case, it would output

    Mar 23 03:23:38 sy postfix/pipe[1702]: 914A04042B: to=<kkk@sympa.example.net>, relay=sympa, delay=0.06, delays=0.03/0.01/0/0.02, dsn=5.3.0, status=bounced (Command died with status 2: "/tmp/printargs.sh". Command output: args: kkk@sympa.example.net )
    
masegaloeh
  • 17,978
  • 9
  • 56
  • 104