Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Could someone please tell me, why Postfix sends each message twice?

I noticed that one message is correctly send and the other may (or may not) have a problem with the encoding.

To be honest I did some adjustments for virtual domains, users,.... but I cannot find why these configurations should not work.

I have the slight feeling it has something to do with virtual users, but I could also be wrong!

EDIT added postconf -n results

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 2
mydestination = reco-server.mydomain, localhost.mydomain,  localhost
myhostname = reco-server.mydomain.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = $mydomain
non_smtpd_milters = inet:localhost:8891
readme_directory = no
recipient_delimiter = +
relayhost = 
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, \   reject_invalid_hostname, reject_unknown_client, \   reject_rbl_client sbl-xbl.spamhaus.org , \   smtpd_sender_restrictions = permit_mynetworks, reject_unknown_address, \   reject_unknown_sender_domain, reject_non_fqdn_sender
smtpd_milters = inet:localhost:8891
smtpd_recipient_limit = 250
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,\    reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/certs/server.crt
smtpd_tls_key_file = /etc/ssl/private/server.key
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_domains = /etc/postfix/virtual_domains
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_transport = dovecot
virtual_uid_maps = static:5000

ALSO: from the log:

Nov 12 12:18:16 reco-server postfix/pickup[8660]: 1B404C35A7: uid=33 from=<www-data>
Nov 12 12:18:16 reco-server postfix/cleanup[9388]: 1B404C35A7: message-id=<b3a040c51775e77d08642080424ae61e@localhost>
Nov 12 12:18:16 reco-server postfix/qmgr[7727]: 1B404C35A7: from=<www-data@mydomain.com>, size=7659, nrcpt=1 (queue active)
Nov 12 12:18:16 reco-server postfix/pickup[8660]: 2978EC35A6: uid=33 from=<www-data>
Nov 12 12:18:16 reco-server postfix/cleanup[9388]: 2978EC35A6: message-id=<125112410529d73e1c2484cf9c991064@localhost>
Nov 12 12:18:16 reco-server postfix/qmgr[7727]: 2978EC35A6: from=<www-data@mydomain.com>, size=1064, nrcpt=1 (queue active)
Nov 12 12:18:16 reco-server postfix/smtp[9396]: 2978EC35A6: lost connection with mta6.am0.yahoodns.net[98.139.54.60] while receiving the initial server greeting
Nov 12 12:18:20 reco-server postfix/smtp[9396]: 2978EC35A6: to=<recipient@yahoo.com>, relay=mta6.am0.yahoodns.net[98.136.217.202]:25, delay=4, delays=0.09/0.01/0.92/3, dsn=2.0.0, status=sent (250 ok dirdel)
Nov 12 12:18:20 reco-server postfix/qmgr[7727]: 2978EC35A6: removed
Nov 12 12:18:20 reco-server postfix/smtp[9394]: 1B404C35A7: to=<recipient@yahoo.com>, relay=mta5.am0.yahoodns.net[98.139.54.60]:25, delay=4.2, delays=0.19/0.01/0.55/3.5, dsn=2.0.0, status=sent (250 ok dirdel)
Nov 12 12:18:20 reco-server postfix/qmgr[7727]: 1B404C35A7: removed
share|improve this question
1  
A sample from your mail log including a message being sent twice would be useful. –  Ladadadada Nov 12 '12 at 11:04
1  
Please provide evidence (i.e. a log excerpt demonstrating the problem) as well as the output of postconf -n. –  Ansgar Wiechers Nov 12 '12 at 11:12
    
Is the added text helpful? –  Savvas Sopiadis Nov 12 '12 at 11:28
    
Can you show us where 1B404C35A7 comes in (output of grep 1B404C35A7 $maillog will do) –  Dennis Kaarsemaker Nov 12 '12 at 12:06
    
@DennisKaarsemaker Edited the bottom part of the log. Is this OK? –  Savvas Sopiadis Nov 12 '12 at 12:14

1 Answer 1

up vote 4 down vote accepted
Nov 12 12:18:16 reco-server postfix/pickup[8660]: 1B404C35A7: uid=33 from=<www-data>

Nov 12 12:18:16 reco-server postfix/pickup[8660]: 2978EC35A6: uid=33 from=<www-data>

Two distinct Queue-IDs indicates that two distinct messages were submitted to postfix; this is caused by your web server process, not postfix.

share|improve this answer
    
Emmm, to be honest i don't understand what this means. Having now tested the command line mail i confirm your observation (i used phplist, which is web-based, to send an email). But now i am more confused: is it a matter of phplist or is it a matter of Apache? –  Savvas Sopiadis Nov 12 '12 at 14:47
    
Apache doesn't send any mail, ever. It is your php application. –  adaptr Nov 12 '12 at 15:01
    
YES!! you're right! i feel so dumb!!! Thanks to your observation i took a good look in phplist where i found the following setting: define('SEND_ONE_TESTMAIL',0); which means: if phplist is about to send a TEST mail, should it send only ONE!!?? My setting was 0, meaning: NO please send TWO!!! Thanks very much!! –  Savvas Sopiadis Nov 12 '12 at 15:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.