• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

can't receive mail send from phpmail

jeanpaul

Basic Pleskian
hi,
i have php forms and somes notifications from OSSEC and plesk server, but i can't receive these mail :

my configuration is plesk 12.0.18
Postfix
dovecot


alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, hash:/var/spool/postfix/plesk/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
disable_vrfy_command = yes
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 20971520
milter_connect_macros = j {daemon_name} v
milter_data_macros = i
milter_end_of_data_macros = i
milter_end_of_header_macros = i
milter_helo_macros = {tls_version} {cipher} {cipher_bits} {cert_subject} {cert_issuer}
milter_macro_daemon_name = $myhostname
milter_macro_v = $mail_name $mail_version
milter_mail_macros = i {auth_type} {auth_authen} {auth_author} {mail_addr}
milter_rcpt_macros = i {rcpt_addr}
mydestination = localhost.$mydomain, localhost, localhost.localdomain
mynetworks = , 127.0.0.0/8, [::1]/128, xx.xx.x.xx/32
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = inet:localhost:12768 unix:/var/spool/postfix/ctmilter/ctmilter.sock
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.8.17/README_FILES
sample_directory = /usr/share/doc/postfix-2.8.17/samples
sender_dependent_default_transport_maps = hash:/var/spool/postfix/plesk/sdd_transport_maps
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_bind_address = my.ip.server
smtp_bind_address6 = my.ip.server.ipv6
smtp_send_xforward_command = yes
smtp_tls_security_level = may
smtp_use_tls = no
smtpd_authorized_xforward_hosts = 127.0.0.0/8 [::1]/128
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated
smtpd_milters = unix:/var/spool/postfix/ctmilter/ctmilter.sock, inet:127.0.0.1:12768
smtpd_proxy_timeout = 3600s
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = check_sender_access hash:/var/spool/postfix/plesk/blacklists, permit_sasl_authenticated
smtpd_timeout = 3600s
smtpd_tls_cert_file = /etc/postfix/postfix_default.pem
smtpd_tls_key_file = $smtpd_tls_cert_file
smtpd_tls_security_level = may
smtpd_use_tls = yes
transport_maps = hash:/var/spool/postfix/plesk/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual
virtual_gid_maps = static:31
virtual_mailbox_base = /var/qmail/mailnames
virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains
virtual_mailbox_maps = hash:/var/spool/postfix/plesk/vmailbox
virtual_transport = plesk_virtual
virtual_uid_maps = static:110


mtpd_milters = inet:localhost:12768 unix:/var/spool/postfix/ctmilter/ctmilter.sock
non_smtpd_milters = inet:localhost:12768 unix:/var/spool/postfix/ctmilter/ctmilter.sock
sender_dependent_default_transport_maps = hash:/var/spool/postfix/plesk/sdd_transport_maps
virtual_transport = plesk_virtual
plesk_virtual_destination_recipient_limit = 1
mailman_destination_recipient_limit = 1
message_size_limit = 20971520
milter_connect_macros = j {daemon_name} v
milter_data_macros = i
milter_end_of_data_macros = i
milter_end_of_header_macros = i
milter_helo_macros = {tls_version} {cipher} {cipher_bits} {cert_subject} {cert_issuer}
milter_macro_daemon_name = $myhostname
milter_macro_v = $mail_name $mail_version
milter_mail_macros = i {auth_type} {auth_authen} {auth_author} {mail_addr}
milter_rcpt_macros = i {rcpt_addr}

in my var log i get
postfix/cleanup[29387]: 199CF5C20C6: to=<[email protected]>, relay=none, delay=0.21, delays=0.21/0/0/0, dsn=5.7.1, status=bounced (Command rejected)

postfix/cleanup[29387]: 199CF5C20C6: milter-reject: DATA from localhost[127.0.0.1]: 5.7.1 Command rejected

milter-reject: DATA from localhost[127.0.0.1]: 5.7.1 Command rejected; from=<[email protected]> to=<[email protected]>


How i can solve this ?
i replace my real ip server by my.server or my.domain
 
Please change the following line:

smtpd_milters = unix:/var/spool/postfix/ctmilter/ctmilter.sock, inet:127.0.0.1:12768
to
smtpd_milters = , inet:127.0.0.1:12768
... and please restart postfix afterwards:
etc/init.d/postfix restart
 
if i do this, i will not get spam protection ?
isn't better if i do this :

smtpd_milters = inet:localhost:12768 unix:/var/spool/postfix/ctmilter/ctmilter.sock
non_smtpd_milters = unix:/var/spool/postfix/ctmilter/ctmilter.sock

instead

smtpd_milters = , inet:127.0.0.1:12768
 
Well, the postfix-spam-protection has still issues with the HELO - command, which may cause errors. You'll find several threads about it here in the forum. You should inverstigate how to setup DKIM and domainkeys and SPF in the correct way to use the Plesk - milter without issues/failures, because this isn't really an easy way to go. Unfortunately Parallels doesn't provide a complete guide, but you will find pieces here in the forum and with the help from documentations and man-pages. Sorry that I can't provide a better suggestion for that - it took some days for me as well, to setup all and I read a lot of useless documentations in the web... none really helped... :rolleyes: ... in the end I got all working together and decided a few weeks later, that it is easier to switch to qmail + dovecot and I must admit, that I should have done this a lot earlier, because I have no issues at all with that combination. ^^
 
Back
Top