Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 17/09/2008, à 23:57

Harry

mailman et postix en utilisateur virtuel (mysql)

je monte un serveur pour héberger dans un espace sécurisé les sites d'une petite communauté de bénévoles.

Sur une Ubuntu serveur 8.04 j'ai installé
Postfix + TLS + SASL + MySQL en fonction de cette doc :
http://doc.ubuntu-fr.org/serveur/postfix_mysql_tls_sasl

avec le petit correctif que j'explique ici
http://forum.ubuntu-fr.org/viewtopic.php?id=250907

Ensuite j'ai ajouté clamav et spamassassin et amavis, roundcube et postfixadmin.
Tout marche du feu de dieu.

Je suis donc passé a la dernière étape mailman.
Et la, je rencontre un problème :
j'ai bien crée une liste mailman puis une de test, mais je reçois un message me disant que l'adresse destinataire n'existe pas quand j'envoie un mail a la liste.


Quelques informations sur ma conf :
postconf -n :

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
content_filter = smtp-amavis:[127.0.0.1]:10024
inet_interfaces = all
mailbox_size_limit = 0
mydestination = hebergement.mondomaine.fr, localhost.localdomain, localhost.localdomain, localhost
myhostname = localhost.localdomain
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_mynetworks,  permit_sasl_authenticated,  reject_non_fqdn_sender,  reject_non_fqdn_recipient,    reject_unauth_destination,  reject_unauth_pipelining,     reject_invalid_hostname,  reject_rbl_client opm.blitzed.org,  reject_rbl_client list.dsbl.org,  reject_rbl_client bl.spamcop.net,  reject_rbl_client sbl-xbl.spamhaus.org,  reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf, hash:/var/lib/mailman/data/virtual-mailman
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 5000
virtual_transport = virtual
virtual_uid_maps = static:5000

Master.cf :

#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
#submission inet n       -       -       -       -       smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       -       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628      inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
	-o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix	-	n	n	-	2	pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}


# amavisd-new
smtp-amavis unix -      -       n     -       8  lmtp
    -o smtp_data_done_timeout=1200
    -o disable_dns_lookups=yes

127.0.0.1:10025 inet n  -       n     -       -  smtpd
    -o content_filter=
    -o local_recipient_maps=
    -o smtpd_helo_restrictions=
    -o smtpd_client_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o mynetworks=127.0.0.0/8

et dans mm_cfg.py j'ai collé :

DEFAULT_EMAIL_HOST = 'hebergement.mondomaine.fr'
#-------------------------------------------------------------
# Default host for web interface of newly created MLs
DEFAULT_URL_HOST   = 'hebergement.mondomaine.fr'
#-------------------------------------------------------------
# Required when setting any of its arguments.
#add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
# gestion des domaines virtuels
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['mondomaine.fr', 'mondomaine2.fr']
add_virtualhost('hebergement.mondomaine.fr', 'mondomaine.fr')
add_virtualhost('hebergement.mondomaine.fr', 'mondomaine2.fr')
MTA='Postfix'

Hors ligne

#2 Le 18/09/2008, à 00:11

Uggy

Re : mailman et postix en utilisateur virtuel (mysql)

Les logs stp ?
http://doc.ubuntu-fr.org/tutoriel/comment_soumettre_un_probleme_postfix_sur_le_forum

Hors ligne

#3 Le 18/09/2008, à 08:02

Harry

Re : mailman et postix en utilisateur virtuel (mysql)

J'ai pas la machine sous la main, donc ils viendrons plus tard.
Mais y'a rien de particulier, juste l'utilisateur inconnu sad

Il semble que postfix ne sache pas rediriger le mail a mailman, enfin c'est ce que j'ai déduit de mes recherches.
Il trouve bien le domaine virtuel (grâce au fichier virtual_domain) mais ne connais pas l'utilisateur (donc le nom de la liste).

Hors ligne

#4 Le 18/09/2008, à 08:17

Harry

Re : mailman et postix en utilisateur virtuel (mysql)

Suis je bête, j'ai la même config ici sur un serveur virtuel, donc "the horror log" :

Sep 13 14:06:17 hebergement postfix/smtpd[6343]: connect from localhost.localdomain[127.0.0.1]
Sep 13 14:06:17 hebergement postfix/smtpd[6343]: 85B69480F2: client=localhost.localdomain[127.0.0.1]
Sep 13 14:06:17 hebergement postfix/cleanup[6336]: 85B69480F2: message-id=<810495083.20080918080852@mondomaine2.fr>
Sep 13 14:06:17 hebergement postfix/qmgr[6329]: 85B69480F2: from=<pascal@mondomaine2.fr>, size=1273, nrcpt=1 (queue active)
Sep 13 14:06:17 hebergement postfix/smtpd[6343]: disconnect from localhost.localdomain[127.0.0.1]
Sep 13 14:06:17 hebergement amavis[4739]: (04739-03) Passed CLEAN, [100.50.50.100] <pascal@mondomaine2.fr> -> <membres@mondomaine.fr>, Message-ID: <810495083.20080918080852@mondomaine2.fr>, mail_id: YcGM5k54EuWd, Hits: 2.459, size: 631, queued_as: 85B69480F2, 8408 ms
Sep 13 14:06:17 hebergement postfix/lmtp[6337]: 1BD58480F1: to=<membres@mondomaine.fr>, relay=127.0.0.1[127.0.0.1]:10024, delay=8.5, delays=0.05/0.01/0.01/8.4, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 85B69480F2)
Sep 13 14:06:17 hebergement postfix/qmgr[6329]: 1BD58480F1: removed
Sep 13 14:06:17 hebergement postfix/virtual[6346]: 85B69480F2: to=<membres@mondomaine.fr>, relay=virtual, delay=0.09, delays=0.03/0.03/0/0.03, dsn=5.1.1, status=bounced (unknown user: "membres@mondomaine.fr")
Sep 13 14:06:17 hebergement postfix/cleanup[6336]: 9B407480F3: message-id=<20080913120617.9B407480F3@localhost.localdomain>
Sep 13 14:06:17 hebergement postfix/qmgr[6329]: 9B407480F3: from=<>, size=3138, nrcpt=1 (queue active)
Sep 13 14:06:17 hebergement postfix/bounce[6347]: 85B69480F2: sender non-delivery notification: 9B407480F3
Sep 13 14:06:17 hebergement postfix/qmgr[6329]: 85B69480F2: removed
Sep 13 14:06:17 hebergement postfix/virtual[6346]: 9B407480F3: to=<pascal@mondomaine2.fr>, relay=virtual, delay=0.05, delays=0.03/0/0/0.02, dsn=2.0.0, status=sent (delivered to maildir)
Sep 13 14:06:17 hebergement postfix/qmgr[6329]: 9B407480F3: removed

Dernière modification par Harry (Le 18/09/2008, à 08:18)

Hors ligne

#5 Le 18/09/2008, à 14:19

Uggy

Re : mailman et postix en utilisateur virtuel (mysql)

Donc pour le mail 85B69480F2 ca donne:


Sep 13 14:06:17 hebergement postfix/smtpd[6343]: 85B69480F2: client=localhost.localdomain[127.0.0.1]
Sep 13 14:06:17 hebergement postfix/cleanup[6336]: 85B69480F2: message-id=<810495083.20080918080852@mondomaine2.fr>
Sep 13 14:06:17 hebergement postfix/qmgr[6329]: 85B69480F2: from=<pascal@mondomaine2.fr>, size=1273, nrcpt=1 (queue active)
Sep 13 14:06:17 hebergement postfix/virtual[6346]: 85B69480F2: to=<membres@mondomaine.fr>, relay=virtual, delay=0.09, delays=0.03/0.03/0/0.03, dsn=5.1.1, status=bounced (unknown user: "membres@mondomaine.fr")
Sep 13 14:06:17 hebergement postfix/bounce[6347]: 85B69480F2: sender non-delivery notification: 9B407480F3
Sep 13 14:06:17 hebergement postfix/qmgr[6329]: 85B69480F2: removed

pour Postfix il faut donc que "membres" soit quelquepart dcclarer comme user "local" soit dans virtual_mailbox_maps soit dans virtual_alias_maps etc...

Je ne connais pas mailman..   donc c'est peut etre un alias a déclarer ? donc dans virtual_alias_maps ?

Hors ligne

#6 Le 18/09/2008, à 14:39

Harry

Re : mailman et postix en utilisateur virtuel (mysql)

Ok, et bien justement, c'est ce je pensais que ferait cela :
virtual_alias_maps =..../..., hash:/var/lib/mailman/data/virtual-mailman

le fichier /var/lib/mailman/data/virtual-mailman :

# This file is generated by Mailman, and is kept in sync with the binary hash
# file virtual-mailman.db.  YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you
# know what you're doing, and can keep the two files properly in sync.  If you
# screw it up, you're on your own.
#
# Note that you should already have this virtual domain set up properly in
# your Postfix installation.  See README.POSTFIX for details.

# LOOP ADDRESSES START
mailman-loop@mondomaine.fr	mailman-loop
mailman-loop@mondomaine2.fr	mailman-loop
# LOOP ADDRESSES END

# STANZA START: mailman
# CREATED: Wed Sep 10 19:44:26 2008
mailman@mondomaine.fr              mailman
mailman-admin@mondomaine.fr        mailman-admin
mailman-bounces@mondomaine.fr      mailman-bounces
mailman-confirm@mondomaine.fr      mailman-confirm
mailman-join@mondomaine.fr         mailman-join
mailman-leave@mondomaine.fr        mailman-leave
mailman-owner@mondomaine.fr        mailman-owner
mailman-request@mondomaine.fr      mailman-request
mailman-subscribe@mondomaine.fr    mailman-subscribe
mailman-unsubscribe@mondomaine.fr  mailman-unsubscribe
# STANZA END: mailman

# STANZA START: membres
# CREATED: Wed Sep 10 19:48:08 2008
membres@mondomaine.fr              membres
membres-admin@mondomaine.fr        membres-admin
membres-bounces@mondomaine.fr      membres-bounces
membres-confirm@mondomaine.fr      membres-confirm
membres-join@mondomaine.fr         membres-join
membres-leave@mondomaine.fr        membres-leave
membres-owner@mondomaine.fr        membres-owner
membres-request@mondomaine.fr      membres-request
membres-subscribe@mondomaine.fr    membres-subscribe
membres-unsubscribe@mondomaine.fr  membres-unsubscribe
# STANZA END: membres

Autrement y'a aussi ce fichier, mais j'en fais quoi :

/var/lib/mailman/data/aliases

# This file is generated by Mailman, and is kept in sync with the
# binary hash file aliases.db.  YOU SHOULD NOT MANUALLY EDIT THIS FILE
# unless you know what you're doing, and can keep the two files properly
# in sync.  If you screw it up, you're on your own.

# The ultimate loop stopper address
mailman-loop: /var/lib/mailman/data/owner-bounces.mbox

# STANZA START: mailman
# CREATED: Wed Sep 10 19:44:26 2008
mailman:             "|/var/lib/mailman/mail/mailman post mailman"
mailman-admin:       "|/var/lib/mailman/mail/mailman admin mailman"
mailman-bounces:     "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:     "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join:        "|/var/lib/mailman/mail/mailman join mailman"
mailman-leave:       "|/var/lib/mailman/mail/mailman leave mailman"
mailman-owner:       "|/var/lib/mailman/mail/mailman owner mailman"
mailman-request:     "|/var/lib/mailman/mail/mailman request mailman"
mailman-subscribe:   "|/var/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"
# STANZA END: mailman

# STANZA START: membres
# CREATED: Wed Sep 10 19:48:08 2008
membres:             "|/var/lib/mailman/mail/mailman post membres"
membres-admin:       "|/var/lib/mailman/mail/mailman admin membres"
membres-bounces:     "|/var/lib/mailman/mail/mailman bounces membres"
membres-confirm:     "|/var/lib/mailman/mail/mailman confirm membres"
membres-join:        "|/var/lib/mailman/mail/mailman join membres"
membres-leave:       "|/var/lib/mailman/mail/mailman leave membres"
membres-owner:       "|/var/lib/mailman/mail/mailman owner membres"
membres-request:     "|/var/lib/mailman/mail/mailman request membres"
membres-subscribe:   "|/var/lib/mailman/mail/mailman subscribe membres"
membres-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe membres"
# STANZA END: test

Dernière modification par Harry (Le 18/09/2008, à 14:44)

Hors ligne

#7 Le 18/09/2008, à 14:49

Uggy

Re : mailman et postix en utilisateur virtuel (mysql)

ok parfait..
Tu as bien pensé a "compiiler" le fichier virtual-mailman ?


man newaliases
man postalias
man postmap

Dernière modification par Uggy (Le 18/09/2008, à 15:46)

Hors ligne

#8 Le 18/09/2008, à 14:54

Harry

Re : mailman et postix en utilisateur virtuel (mysql)

euhh, tu peux développer, because la je te suis plus sad
J'ai rien lu de tel dans aucune des innombrables prose sur le sujet cool

Hors ligne

#9 Le 18/09/2008, à 15:44

Uggy

Re : mailman et postix en utilisateur virtuel (mysql)

http://www.postfix.org/postconf.5.html#virtual_alias_maps

If you use this feature with indexed files, run "postmap /etc/postfix/virtual" after changing the file.

Il n'y a qu'une seule et unique prose a lire, coup de chance elle est fiable,  le site de postfix wink

Dernière modification par Uggy (Le 18/09/2008, à 15:48)

Hors ligne

#10 Le 18/09/2008, à 15:54

Harry

Re : mailman et postix en utilisateur virtuel (mysql)

Ce qui est zarbi, c'est que si je modifie le contenu du fichier virtual-aliases, cela a un effet direct sur le fonctionnement de postfix.
donc a quoi sert cette "compilation" ?


Et la je fais joujou avec ma plate forme de test (cf mon mail) et j'ai d'autres soucis (DNS manque les enrg type A)  Grrr


Uggy a écrit :

Il n'y a qu'une seule et unique prose a lire, coup de chance elle est fiable,  le site de postfix wink

Arf, tu parle d'une prose yikes

Hors ligne

#11 Le 18/09/2008, à 16:10

Uggy

Re : mailman et postix en utilisateur virtuel (mysql)

Harry a écrit :

Ce qui est zarbi, c'est que si je modifie le contenu du fichier virtual-aliases, cela a un effet direct sur le fonctionnement de postfix.

Ah. Quel effet ? De toute facon moi c'est les logs ou rien wink


Harry a écrit :

donc a quoi sert cette "compilation" ?

Je ne suis pas le developpeur.. peut etre une question de performances pour parser le ficher.. peut etr pour des questions de retro compatibilité avec les fichiers qui existaient sous sendmail etc.. a rechercher sur le net...


Bref ca fonctionne en postmapant ou pas ?

Hors ligne

#12 Le 18/09/2008, à 20:30

Harry

Re : mailman et postix en utilisateur virtuel (mysql)

Sep 18 20:28:20 hebergement postfix/local[5039]: C1DD412B55: to=<membres@hebergement.mondomaine.fr>, relay=local, delay=0.06, delays=0.02/0.03/0/0.02, dsn=5.1.1, status=bounced (unknown user: "membres")

bouhh je me meurs

Hors ligne

#13 Le 18/09/2008, à 22:44

Uggy

Re : mailman et postix en utilisateur virtuel (mysql)

pop pop pop..
tout a l'heure c'etait pour
to=<membres@mondomaine.fr>

et maintenant ca passe a
to=<membres@hebergement.mondomaine.fr>

sinon ok le pb est le meme


Prouve que tu as postmappé avec la bonne commande...
T'as fait un "postfix reload" apres ?

Hors ligne

#14 Le 19/09/2008, à 13:53

Harry

Re : mailman et postix en utilisateur virtuel (mysql)

Oui ca me gave, hebergement est le nom de mon serveur cf :
mydestination = hebergement.mondomaine.fr, localhost.localdomain, localhost.localdomain, localhost

donc plus je fais des manip plus ca me gave grave.
Donc je vais pour le moment je vais abandonner la mailling liste.

Je vais refaire mon serveur de prod avec tout le reste.
Ensuite quand ce dernier sera terminé et stabilisé, je me replongerai dans la mailling liste.

Merci de ton coup de main en tout cas, et a bientôt certainement.
De toute façon je ferais un tuto complet sur cette configuration wink

Dernière modification par Harry (Le 19/09/2008, à 13:54)

Hors ligne