Léa-Linux & amis :   LinuxFR   GCU-Squad   GNU
PostFix : fatal: get_service_attr: unknown username: vmail
Envoyé par: MaxleCh'ti

Bonsoir à tous,

J'ai un soucis avec postfix, je teste avec un envoi d'email par formulaire vers une adresse "destinataire@un-domaine.fr' mais le premier appel ne passe pas. Je pense avoir un soucis avec postfix ...

Dans /var/log/mail.err j'ai ceci :

Jan 21 22:59:12 stock postfix/pipe[1537]: fatal: get_service_attr: unknown username: vmail
Je ne sais pas ce que ça veut dire exactement.

et dans /var/log/mail.log j'ai ceci :

Jan 21 22:59:12 stock postfix/pickup[29993]: 89E53809B5: uid=33 from=<www-data>
Jan 21 22:59:12 stock postfix/cleanup[1532]: 89E53809B5: message-id=<20090121215912.89E53809B5@mail.mon-domaine.com>
Jan 21 22:59:12 stock postfix/qmgr[29141]: 89E53809B5: from=<www-data@mail.mon-domaine.com>, size=536, nrcpt=1 (queue active)
Jan 21 22:59:12 stock postfix/smtpd[1536]: connect from localhost.localdomain[127.0.0.1]
Jan 21 22:59:12 stock postfix/smtpd[1536]: BC554809BA: client=localhost.localdomain[127.0.0.1]
Jan 21 22:59:12 stock postfix/cleanup[1532]: BC554809BA: message-id=<20090121215912.89E53809B5@mail.mon-domaine.com>
Jan 21 22:59:12 stock postfix/smtpd[1536]: disconnect from localhost.localdomain[127.0.0.1]
Jan 21 22:59:12 stock amavis[364]: (00364-03) Passed BAD-HEADER, <www-data@mail.mon-domaine.com> -> <destinataire@un-domaine.fr>, quarantine: badh-MjultRXyy+kI, Message-ID: <20090121215912.89E53809B5@mail$
Jan 21 22:59:12 stock postfix/smtp[1534]: 89E53809B5: to=<destinataire@un-domaine.fr>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.31, delays=0.05/0.03/0/0.22, dsn=2.6.0, status=sent (250 2.6.0 Ok, id=00364-03, f$
Jan 21 22:59:12 stock postfix/qmgr[29141]: BC554809BA: from=<www-data@mail.mon-domaine.com>, size=1107, nrcpt=1 (queue active)
Jan 21 22:59:12 stock postfix/pipe[1537]: fatal: get_service_attr: unknown username: vmail
Jan 21 22:59:12 stock postfix/qmgr[29141]: 89E53809B5: removed
Jan 21 22:59:13 stock postfix/master[29138]: warning: process /usr/lib/postfix/pipe pid 1537 exit status 1
Jan 21 22:59:13 stock postfix/master[29138]: warning: /usr/lib/postfix/pipe: bad command startup -- throttling
Jan 21 22:59:13 stock postfix/qmgr[29141]: warning: premature end-of-input on private/maildrop socket while reading input attribute name
Jan 21 22:59:13 stock postfix/qmgr[29141]: warning: private/maildrop socket: malformed response
Jan 21 22:59:13 stock postfix/qmgr[29141]: warning: transport maildrop failure -- see a previous warning/fatal/panic logfile record for the problem description
Jan 21 22:59:13 stock postfix/qmgr[29141]: BC554809BA: to=<destinataire@un-domaine.fr>, relay=none, delay=1.1, delays=0.1/1/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)

Poste le Wednesday 21 January 2009 23:06:03
Répondre     Citer    
Re: PostFix : fatal: get_service_attr: unknown username: vmail
Envoyé par: MaxleCh'ti

Au démarrage de postfix j'ai déjà une erreur qui est peut-être arrivée suite au passage de Ubuntu Feisty à Hardy (le fichier /etc/issue a été conservé)



# postfix start
postfix/postfix-script: warning: /var/spool/postfix/etc/localtime and /etc/localtime differ
postfix/postfix-script: warning: /var/spool/postfix/etc/services and /etc/services differ
postfix/postfix-script: starting the Postfix mail system




# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
body_checks = regexp:/etc/postfix/body_checks
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
inet_interfaces = all
inet_protocols = ipv4
mailbox_command = maildrop
mailbox_size_limit = 0
mydestination = mail.mon-domaine.com, ks353968.kimsufi.com, localhost.kimsufi.com, localhost
mydomain = mon-domaine.com
myhostname = mail.mon-domaine.com
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = 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_database = btree:${queue_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
virtual_mailbox_domains = mon-domaine.fr un-domaine.fr
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_transport = maildrop


main.cf :
content_filter = smtp-amavis:[127.0.0.1]:10024

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

virtual_transport = maildrop
virtual_mailbox_domains = mon-domaine.fr un-domaine.fr
virtual_mailbox_maps = hash:/etc/postfix/vmailbox

myhostname = mail.mon-domaine.com
mydomain = mon-domaine.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.mon-domaine.com, hote.kimsufi.com, localhost.kimsufi.com, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = maildrop
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
body_checks = regexp:/etc/postfix/body_checks


le fichier /etc/postfix/vmailbox

contact@mon-domaine.fr  mon-domaine.fr/contact
contact@un-domaine.fr un-domaine.fr/contact

et j'ai de nouvelles erreurs depuis ce matin :

Jan 22 11:36:48 stock postfix/local[10728]: 7F03F80847: to=<www-data@mail.mon-domaine.com>, relay=local, delay=219108, delays=219107/0.9/0/0.02, dsn=4.3.0, status=de$
Jan 22 11:36:48 stock postfix/local[10720]: 7A3678092D: to=<www-data@mail.mon-domaine.com>, relay=local, delay=151895, delays=151894/0.91/0/0.03, dsn=4.3.0, status=d$
Jan 22 11:36:48 stock postfix/local[10718]: CCF3B8086D: to=<www-data@mail.mon-domaine.com>, relay=local, delay=254624, delays=254623/0.92/0/0.03, dsn=4.3.0, status=d$
$us=deferred (temporary failure. Command output: maildrop: Home directory owned by wrong user. )

Poste le Thursday 22 January 2009 11:51:42
Répondre     Citer    
Re: PostFix : fatal: get_service_attr: unknown username: vmail
Envoyé par: peck

Ton mail est envoyé à www-data, postfix n'est pas content car le home de www-data n'appartient pas à www-data. Ce qui est un peu normal puisque ce n'est pas un ut_ilisateur qui est sensé être connecté.

[linux-attitude.fr]

Poste le Friday 30 January 2009 19:08:44
Répondre     Citer    
Re: PostFix : fatal: get_service_attr: unknown username: vmail
Envoyé par: MaxleCh'ti

Désolé du retard.

... et comment je peux faire si je ne peux pas faire un chown vu que cet utilisateur n'existe pas ?

Poste le Saturday 31 January 2009 10:57:31
Répondre     Citer    
Re: PostFix : fatal: get_service_attr: unknown username: vmail
Envoyé par: MaxleCh'ti

J'ai fait

chown www-data un-domaine.fr/
chown www-data un-domaine.fr/contact
chown www-data mon-domaine.fr/
chown www-data mon-domaine.fr/contact

mais rien n'y fait ....

Poste le Saturday 31 January 2009 12:55:01
Répondre     Citer    
Re: PostFix : fatal: get_service_attr: unknown username: vmail
Envoyé par: MaxleCh'ti

J'ai supprimé les répertoires contact, créé des fichiers vide avec le bon propriétaire et les bons droits ... ça a l'air de passer

Poste le Saturday 31 January 2009 14:42:44
Répondre     Citer    
Re: PostFix : fatal: get_service_attr: unknown username: vmail
Envoyé par: peck

Tu n'es tout simplement pas sensé envoyer de mail à l'utilisateur www-data

[linux-attitude.fr]

Poste le Sunday 1 February 2009 14:19:27
Répondre     Citer    
Re: PostFix : fatal: get_service_attr: unknown username: vmail
Envoyé par: MaxleCh'ti

Tu as raison peck.

En fesant

postcat -q id_de_mail

j'ai pu voir les mails qui posent problème, normalement, le script PHP qui envoi le mail ne l'envoi pas à www-data mais je finirai pas trouver ...(je posterai la solution si ça peut aider quelqu'un d'autre)

Merci de ton intérêt pour ce petit soucis smiling smiley

Poste le Monday 2 February 2009 15:46:27
Répondre     Citer    

Veuillez vous authentifier auparavant pour commenter.

 

Ce forum !
PostFix : fatal: get_service_attr: unknown username: vmail
Posez dans ce forum les questions qui ne trouvent pas place dans les autres...

Sauf mention contraire, les documentations publiées sont sous licence Creative-Commons