Postfix bizarroide

Bonjour,

Je viens a vous concernant un problème d’envoi et de reception de mail.

J’ai une adresse www@srv-home.fr ou la reception et l’envoi de mail fonctionne.
J’ai une autre adresse serveur@srv-home.fr ou n’y la reception et n’y l’envoi fonctionne.

Voilà un bout du mail.info avec le serveur@srv-home.fr :

Mar 19 17:06:33 srv-home postfix/smtpd[3849]: connect from localhost[127.0.0.1] Mar 19 17:06:33 srv-home postfix/trivial-rewrite[3852]: warning: do not list domain srv-home.fr in BOTH mydestination and virtual_mailbox_domains Mar 19 17:06:33 srv-home postfix/smtpd[3849]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.0 <serveur@srv-home.fr>: Sender address rejected: User unknown in local recipient table; from$ Mar 19 17:06:33 srv-home roundcube: Invalid response code received from server (550): Mar 19 17:06:33 srv-home roundcube: SMTP Error: SMTP error: Failed to add recipient 'prohand20@gmail.com' in /usr/share/apache2/roundcubemail-0.5.1/program/steps/mail/func.inc on line 1491 (POST /$ Mar 19 17:06:33 srv-home postfix/smtpd[3849]: disconnect from localhost[127.0.0.1]

Voici l’envoi avec www@srv-home.fr

Mar 19 17:04:48 srv-home postfix/smtpd[3812]: connect from localhost[127.0.0.1]
Mar 19 17:04:48 srv-home postfix/trivial-rewrite[3815]: warning: do not list domain srv-home.fr in BOTH mydestination and virtual_mailbox_domains
Mar 19 17:04:48 srv-home postfix/smtpd[3812]: 12FB6148248: client=localhost[127.0.0.1], sasl_method=LOGIN, sasl_username=www@srv-home.fr
Mar 19 17:04:48 srv-home postfix/cleanup[3816]: 12FB6148248: message-id=<96cc2fc6900449af5469f72484cfb94b@srv-home.fr>
Mar 19 17:04:48 srv-home postfix/qmgr[3803]: 12FB6148248: from=<www@srv-home.fr>, size=513, nrcpt=1 (queue active)
Mar 19 17:04:48 srv-home roundcube: User www@srv-home.fr [192.168.0.4]; Message for prohand20@gmail.com; 250: 2.0.0 Ok: queued as 12FB6148248
Mar 19 17:04:48 srv-home postfix/smtpd[3812]: disconnect from localhost[127.0.0.1]
Mar 19 17:04:48 srv-home postfix/smtpd[3824]: connect from localhost[127.0.0.1]
Mar 19 17:04:48 srv-home postfix/trivial-rewrite[3815]: warning: do not list domain srv-home.fr in BOTH mydestination and virtual_mailbox_domains
Mar 19 17:04:48 srv-home postfix/smtpd[3824]: 6410B148249: client=localhost[127.0.0.1]
Mar 19 17:04:48 srv-home postfix/cleanup[3816]: 6410B148249: message-id=<96cc2fc6900449af5469f72484cfb94b@srv-home.fr>
Mar 19 17:04:48 srv-home postfix/qmgr[3803]: 6410B148249: from=<www@srv-home.fr>, size=1428, nrcpt=1 (queue active)
Mar 19 17:04:48 srv-home postfix/smtpd[3824]: disconnect from localhost[127.0.0.1]
Mar 19 17:04:48 srv-home amavis[2665]: (02665-04) Passed CLEAN, MYNETS/MYUSERS LOCAL [127.0.0.1] [127.0.0.1] <www@srv-home.fr> -> <prohand20@gmail.com>, Message-ID: <96cc2fc6900449af5469f72484cfb9$
Mar 19 17:04:48 srv-home postfix/smtp[3821]: 12FB6148248: to=<prohand20@gmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.42, delays=0.09/0.01/0.01/0.31, dsn=2.0.0, status=sent (250 2.0.0 Ok, $
Mar 19 17:04:48 srv-home postfix/qmgr[3803]: 12FB6148248: removed
Mar 19 17:04:50 srv-home postfix/smtp[3825]: 6410B148249: to=<prohand20@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.77.27]:25, delay=1.6, delays=0.02/0.01/0.27/1.3, dsn=2.0.0, status=sent $
Mar 19 17:04:50 srv-home postfix/qmgr[3803]: 6410B148249: removed

Voici le main.cf

[code]

See /usr/share/postfix/main.cf.dist for a commented, more complete version

Debian specific: Specifying a file name will cause the first

line of that file to be used as the name. The Debian default

is /etc/mailname.

#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
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

readme_directory = no

TLS parameters

smtpd_tls_cert_file = /etc/ssl/certs/iRedMail_CA.pem
smtpd_tls_key_file = /etc/ssl/private/iRedMail.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for

information on enabling SSL in the smtp client.

myhostname = srv-home.fr
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
myorigin = srv-home.fr
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = /usr/lib/dovecot/deliver
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
mydomain = srv-home.fr
inet_protocols = ipv4
mynetworks_style = subnet
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_reject_unlisted_recipient = yes
smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated
delay_warning_time = 0h
policy_time_limit = 3600
maximal_queue_lifetime = 1d
bounce_queue_lifetime = 1d
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_$
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks,permit_sasl_authenticated, check_helo_access pcre:/etc/postfix/helo_access.pcre
queue_run_delay = 300s
minimal_backoff_time = 300s
maximal_backoff_time = 4000s
enable_original_recipient = no
disable_vrfy_command = yes
home_mailbox = Maildir/
allow_min_user = no
message_size_limit = 15728640
virtual_minimum_uid = 1001
virtual_uid_maps = static:1001
virtual_gid_maps = static:1001
virtual_mailbox_base = /var/vmail
transport_maps = proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf, proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf, proxy:mysql:/etc/postfix/mysql/domain_alias_maps.cf
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_user.cf
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql/relay_domains.cf
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql/sender_login_maps.cf
smtpd_reject_unlisted_sender = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = no
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unlisted_recipient, permit_mynetworks, permi$
smtpd_tls_security_level = may
smtpd_enforce_tls = no
smtpd_tls_loglevel = 0
smtpd_tls_CAfile = /etc/ssl/certs/iRedMail_CA.pem
tls_random_source = dev:/dev/urandom
tls_daemon_random_source = dev:/dev/urandom

Uncomment the following line to enable policyd sender throttle.

#smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10032
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = ./dovecot-auth
content_filter = smtp-amavis:[127.0.0.1]:10024[/code]

J’ai suivi ce tutoriel pour l’installation :

admin6.fr/2010/02/serveur-ma … v-webmail/

Merci de votre aide.

Il semblerait que l’user ‘serveur’ n’ait pas été créé, tout simplement !

Il n’est pas crée ou ?

Merci

[quote=“prohand”]Il n’est pas crée ou ?

Merci[/quote]

Je viens de jeter un oeil au tuto que tu as suivi.
C’est parfait sauf que tout est fait par un script, du coup tu passe à côté de toutes les étapes de la construction du serveur mail, et de la compréhension des mécanismes…

Ton fichier main.cf fait 50 km de long, le mien fait moitié moins long, mais je sais à qui servent toutes les directives.

Il va falloir essayer de comprendre comment tout cela marche. Et personne ici ne le fera à ta place, désolé.

Ok mais tu fais par authentification mysql ?
Peux tu me poster ton main.cf ?

Merci

[quote=“prohand”]Ok mais tu fais par authentification mysql ?[/quote]Oui

[quote=“prohand”]Peux tu me poster ton main.cf ?[/quote]J’ai réinstallé il y a peu de temps (le semaine dernière) et j’ai suivi (principalement) ce tuto : bytetouch.com/blog/linux/how … ian-lenny/ (pour la partie Postfix/Dovecot/Mysql). J’ai choisi postfixadmin pour simplifier la création des utilisateurs.

Je veux bien te donne mon main.cf, mais cela ne te servira pas à grand chose, a moins d’avoir la même config.

[code]
biff = no
append_dot_mydomain = no
delay_warning_time = 4h
readme_directory = no

smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

myhostname = passerelle.zehome.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = passerelle.zehome.org, localhost.zehome.org, , localhost
relayhost =
mynetworks = 192.168.0.0/22 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
dovecot_destination_recipient_limit = 1

virtual_uid_maps = static:3000
virtual_gid_maps = static:3000
virtual_mailbox_base = /home/facteur

virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
relay_domains = mysql:/etc/postfix/mysql_relay_domains.cf

smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unauth_destination,
reject_unauth_pipelining,
reject_invalid_hostname

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous

virtual_transport = dovecot
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings[/code]

La première fois que j’ai monté un serveur mail j’ai fait l’erreur de suivre plusieurs tutos… mortel, je ne comprenais plus rien…
Essaye de construire petit à petit et de tester régulièrement.

[quote=“lol”][quote=“prohand”]Ok mais tu fais par authentification mysql ?[/quote]Oui

[quote=“prohand”]Peux tu me poster ton main.cf ?[/quote]J’ai réinstallé il y a peu de temps (le semaine dernière) et j’ai suivi (principalement) ce tuto : bytetouch.com/blog/linux/how … ian-lenny/ (pour la partie Postfix/Dovecot/Mysql). J’ai choisi postfixadmin pour simplifier la création des utilisateurs.

Je veux bien te donne mon main.cf, mais cela ne te servira pas à grand chose, a moins d’avoir la même config.

[code]
biff = no
append_dot_mydomain = no
delay_warning_time = 4h
readme_directory = no

smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

myhostname = passerelle.zehome.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = passerelle.zehome.org, localhost.zehome.org, , localhost
relayhost =
mynetworks = 192.168.0.0/22 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
dovecot_destination_recipient_limit = 1

virtual_uid_maps = static:3000
virtual_gid_maps = static:3000
virtual_mailbox_base = /home/facteur

virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
relay_domains = mysql:/etc/postfix/mysql_relay_domains.cf

smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unauth_destination,
reject_unauth_pipelining,
reject_invalid_hostname

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous

virtual_transport = dovecot
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings[/code]

La première fois que j’ai monté un serveur mail j’ai fait l’erreur de suivre plusieurs tutos… mortel, je ne comprenais plus rien…
Essaye de construire petit à petit et de tester régulièrement.[/quote]
Et pour clamav ? phpmyadmin ? tu a utilisé quel tutoriel ?
Ta debian était vierge quand tu as utilis& ce tutoriel ?

Merci

Bon ba merci tout est installé avec succès avec le tutoriel que tu m’a donné.
Je voulais savoir si tu avais installé clamav et amavisd et si oui quel tutoriel as tu utilisé ?

Merci

Salut,
Ravi que ça fasse l’affaire.
Je suis parti d’une nouvelle installation.

Pour l’integration amavamisd + filtes (spamassassin et clamav) regarde ici : serion.co.nz/content/howto-setup … amavis-new

Et voici mes notes au cas ou…

[code]# nano /etc/postfix/main.cf
virtual_transport = dovecot

nano /etc/postfix/master.cf

dovecot unix - n n - - pipe
flags=DRhu user=facteur:facteur argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes

127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_bind_address=127.0.0.1

nano /etc/dovecot/dovecot.conf

protocol lda {

Address to use when sending rejection mails.

postmaster_address = admin@zehome.org

Support for dynamically loadable plugins. mail_plugins is a space separated

list of plugins to load.

mail_plugin_dir = /usr/lib/dovecot/modules/lda

UNIX socket path to master authentication server to find users.

auth_socket_path = /var/run/dovecot/auth-master

Enabling Sieve plugin for server-side mail filtering

mail_plugins = sieve quota

#log_path = /var/vmail/dovecot-deliver.log
#info_log_path = /var/vmail/dovecot-deliver.log
}

socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
user = facteur # User running Dovecot LDA
#group = vmail # Or alternatively mode 0660 + LDA user in this group
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}

nano /etc/amavis/conf.d/15-content_filter_mode

use strict;

@bypass_virus_checks_maps = (
%bypass_virus_checks, @bypass_virus_checks_acl, $bypass_virus_checks_re);

@bypass_spam_checks_maps = (
%bypass_spam_checks, @bypass_spam_checks_acl, $bypass_spam_checks_re);

1; # ensure a defined return

adduser clamav amavis

/etc/init.d/amavis restart

/etc/init.d/clamav-daemon restart

postconf -e ‘content_filter = amavis:[127.0.0.1]:10024’

postconf -e ‘receive_override_options = no_address_mappings’

/etc/init.d/postfix restart

[/code]

Je dois faire un tuto et mettre ça sur le Wiki, mais je n’ai pas encore trouvé le temps… :wink:
J’ai tout noté au fur et à mesure dans mon Wiki “maison” il ne reste plus qu’a…