| |||||
| Dernière réponse | |
|---|---|
| Sujet : problème avec maildrop "cc" | |
| thierry_b | Bonjour,
j'utilse postfix+maildrop+mysql+courier-imap+amavis++clamav. J'ai essayé de contourner la difficulé que j'avais avec postfix, pour la réaliser avec maaildrop. Je m'explique. J'aimerais que tous les mails pour thierry@linux.thierry.eu.org, (qui a une boite aux lettres valide) soit copié à thbouhnik@free.fr. C'est mieux que ca marche dans maildrop, ce qui me permettrait même de mettre une condition sur le fait qu'il copie ou non le message à d'autres destinataires que thierry@linux.thierrry.eu.org. J'ai mis ceci dans mon fichier maildroprc: if ( $SIZE < 26144 ) { exception { xfilter "/usr/bin/spamassassin --prefspath=$HOME/$DEFAULT/.spamassassin/user_prefs" } } if (/^X-Spam-Flag: *YES/) { exception { to "$HOME/$DEFAULT/.Spam/" } } if (/^To: teil@linux.thierry.eu.org/) { exception { to "$HOME/$DEFAULT/.Teil/" } } else { exception { cc "!thbouhnik@free.fr" to "$HOME/$DEFAULT" } } Le problème que j'ai c'est que pour envoyer le courrier à thbouhnik@free.fr, il n'utilise pas le from, d'origine du mail :-( . Je vous copie colle mes logs de postfix: Dec 20 02:29:03 thierry postfix/postfix-script: stopping the Postfix mail system Dec 20 02:29:03 thierry postfix/master[5671]: terminating on signal 15 Dec 20 02:29:04 thierry postfix/postfix-script: starting the Postfix mail system Dec 20 02:29:04 thierry postfix/master[5805]: daemon started -- version 2.1.5 Dec 20 02:29:40 thierry postfix/smtpd[5813]: connect from serveur[192.168.0.3] Dec 20 02:29:40 thierry postfix/smtpd[5813]: EB54B92BB1: client=serveur[192.168.0.3] Dec 20 02:29:40 thierry postfix/cleanup[5819]: EB54B92BB1: message-id=<41C62AF8.3030107@bouhnik.biz> Dec 20 02:29:40 thierry postfix/qmgr[5809]: EB54B92BB1: from=<thierry@bouhnik.biz>, size=1193, nrcpt=1 (queue active) Dec 20 02:29:40 thierry postfix/smtpd[5813]: disconnect from serveur[192.168.0.3] Dec 20 02:29:41 thierry postfix/smtpd[5821]: connect from localhost[127.0.0.1] Dec 20 02:29:41 thierry postfix/smtpd[5821]: 1756192BB2: client=localhost[127.0.0.1] Dec 20 02:29:41 thierry postfix/cleanup[5819]: 1756192BB2: message-id=<41C62AF8.3030107@bouhnik.biz> Dec 20 02:29:41 thierry postfix/qmgr[5809]: 1756192BB2: from=<thierry@bouhnik.biz>, size=1645, nrcpt=1 (queue active) Dec 20 02:29:41 thierry amavis[4577]: (04577-02) Passed, <thierry@bouhnik.biz> -> <thierry@linux.thierry.eu.org>, Message-ID: <41C62AF8.3030107@bouhnik.biz>, Hits: - Dec 20 02:29:41 thierry postfix/lmtp[5820]: EB54B92BB1: to=<thierry@linux.thierry.eu.org>, relay=127.0.0.1[127.0.0.1], delay=1, status=sent (250 2.6.0 Ok, id=04577-02, from MTA: 250 Ok: queued as 1756192BB2) Dec 20 02:29:41 thierry postfix/smtpd[5821]: disconnect from localhost[127.0.0.1] Dec 20 02:29:41 thierry postfix/qmgr[5809]: EB54B92BB1: removed Dec 20 02:29:42 thierry postfix/pickup[5808]: E711692BB3: uid=1005 from=<vmail> Dec 20 02:29:42 thierry postfix/cleanup[5819]: E711692BB3: message-id=<41C62AF8.3030107@bouhnik.biz> Dec 20 02:29:42 thierry postfix/qmgr[5809]: E711692BB3: from=<vmail@debian.debian>, size=1809, nrcpt=1 (queue active) Dec 20 02:29:42 thierry postfix/pipe[5823]: 1756192BB2: to=<thierry@linux.thierry.eu.org>, relay=maildrop, delay=1, status=sent (linux.thierry.eu.org) Dec 20 02:29:42 thierry postfix/qmgr[5809]: 1756192BB2: removed Dec 20 02:29:43 thierry postfix/smtpd[5821]: connect from localhost[127.0.0.1] Dec 20 02:29:43 thierry postfix/smtpd[5821]: 0783792BB1: client=localhost[127.0.0.1] Dec 20 02:29:43 thierry postfix/cleanup[5819]: 0783792BB1: message-id=<41C62AF8.3030107@bouhnik.biz> Dec 20 02:29:43 thierry postfix/qmgr[5809]: 0783792BB1: from=<vmail@debian.debian>, size=2241, nrcpt=1 (queue active) Dec 20 02:29:43 thierry postfix/smtpd[5821]: disconnect from localhost[127.0.0.1] Dec 20 02:29:43 thierry amavis[4577]: (04577-02-2) Passed, <vmail@debian.debian> -> <thbouhnik@free.fr>, Message-ID: <41C62AF8.3030107@bouhnik.biz>, Hits: - Dec 20 02:29:43 thierry postfix/lmtp[5820]: E711692BB3: to=<thbouhnik@free.fr>, relay=127.0.0.1[127.0.0.1], delay=1, status=sent (250 2.6.0 Ok, id=04577-02-2, from MTA: 250 Ok: queued as 0783792BB1) Dec 20 02:29:43 thierry postfix/qmgr[5809]: E711692BB3: removed Dec 20 02:29:43 thierry postfix/smtp[5829]: 0783792BB1: to=<thbouhnik@free.fr>, relay=mx.free.fr[212.27.42.22], delay=0, status=bounced (host mx.free.fr[212.27.42.22] said: 553 sorry, your envelope sender domain must exist (#5.7.1) (in reply to MAIL FROM command)) Dec 20 02:29:43 thierry postfix/cleanup[5819]: EB8C892BB2: message-id=<20041220012943.EB8C892BB2@debian> Dec 20 02:29:43 thierry postfix/qmgr[5809]: EB8C892BB2: from=<>, size=3998, nrcpt=1 (queue active) Dec 20 02:29:43 thierry postfix/qmgr[5809]: 0783792BB1: removed Dec 20 02:29:44 thierry postfix/smtp[5831]: EB8C892BB2: to=<vmail@debian.debian>, relay=none, delay=1, status=bounced ([debian.debian]: Name or service not known) Dec 20 02:29:44 thierry postfix/qmgr[5809]: EB8C892BB2: removed Dec 20 02:34:34 thierry imaplogin: DISCONNECTED, user=thierry@linux.thierry.eu.org, ip=[::ffff:127.0.0.1], headers=0, body=0, time=557 Dec 20 02:34:34 thierry imaplogin: DISCONNECTED, user=thierry@linux.thierry.eu.org, ip=[::ffff:127.0.0.1], headers=0, body=0, time=581 Dec 20 02:34:34 thierry imaplogin: DISCONNECTED, user=thierry@linux.thierry.eu.org, ip=[::ffff:127.0.0.1], headers=223, body=8210, time=580 On voit bien que le from d'origine c'est thierry@bouhnik.biz, et qu'il essaie avec vmail@debian.debian, (vmail etant le user, qui dans son home a tous les comptes mails.... et debian c'est un domaine local que j'ai donné dans postfix dans main.cf) Voila mon main.cf de postfix: main.cf: myhostname = debian mydomain = debian mydestination = $myhostname local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname home_mailbox = Maildir/ smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous smtpd_sasl_local_domain = $myhostname broken_sasl_auth_clients = yes alias_maps = mysql:/etc/postfix/mysql-aliases.cf relocated_maps = mysql:/etc/postfix/mysql-relocated.cf transport_maps = mysql:/etc/postfix/mysql-transport.cf maildrop_destination_recipient_limit = 1 virtual_transport = maildrop virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-domains.cf virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf virtual_mailbox_base = /home/vmail virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf virtual_uid_maps = mysql:/etc/postfix/mysql-virtual-uid.cf virtual_gid_maps = mysql:/etc/postfix/mysql-virtual-gid.cf Et voici aussi mon master.cf, car appremment c'est lui qui transmet les infos à maildrop: (je copie que la ligne interessante) maildrop unix - n n - - pipe flags=R user=vmail argv=/usr/local/bin/maildrop -d ${recipient} Je me demande pkoi quand maildrop arrive dans le cas d'un alias, cad (teil@linux.thierry.eu.org), il va bien le copier dans "$HOME/$DEFAULT/.Teil/" et après dans ce dossier, j'ai le mail avec le VRAI from lol, mais que dans le cas du cc, il essaie d'envoyer avec le domaine local, au lieu de prendre le bon from d'origine. Voila mm le contenu de mon maildropmysql.config (car tout passe par du mysql) hostname 127.0.0.1 port 3306 database mail dbuser vmail dbpw xxxxxxxxxxx dbtable postfix_users default_uidnumber 1001 default_gidnumber 1001 uid_field email uidnumber_field uid gidnumber_field gid maildir_field maildir homedirectory_field homedir quota_field quota mailstatus_field postfix where_clause AND postfix = 'Y' Je vous remercie bcp. A+ |
| Vue Rapide de la discussion |
|---|