1

I checked the different answers on google and on this site about this kind of issue, but couldn't find any matching ones.

I just can't send email from local (webmail) or from external mail clients to outside email addresses.

Here is my relevant log.

I removed the -v (verbose) option in master.cfg... Here the output :

Aug 28 02:24:04 cyrcee postfix/smtpd[25688]: connect from cyrcee.lunae.community[151.80.47.124]
Aug 28 02:24:04 cyrcee postfix/trivial-rewrite[25692]: warning: do not list domain lunae.community in BOTH mydestination and virtual_mailbox_domains
Aug 28 02:24:05 cyrcee postfix/smtpd[25688]: NOQUEUE: reject: RCPT from cyrcee.lunae.community[151.80.47.124]: 454 4.7.1 <gwenaelle.brosseau@gmail.com>: Relay access denied; from=<selune@lunae.community> to=<gwenaelle.brosseau@gmail.com> proto=ESMTP helo=<webmail.lunae.community>
Aug 28 02:24:05 cyrcee postfix/smtpd[25688]: disconnect from cyrcee.lunae.community[151.80.47.124]

Here my Full main.cfg : (edit : added the WAN IP in mynetworks, no delay access error anymore from the webmail toward external mailbox, but not from outside toward local mailbox) (edit2 : inserted the full cfg file)

mydomain = lunae.community
myorigin = $mydomain
smtpd_banner = $myhostname ESMTP $mail_name
biff = no
minimal_backoff_time = 1000s
maximal_backoff_time = 8000s
smtp_helo_timeout = 60s
virtual_transport = dovecot
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf, mysql:/etc/postfix/mysql_virtual_alias_domainaliases_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:150
virtual_gid_maps = static:8
smtp_use_tls = yes
smtp_tls_security_level = may
smtp_tls_loglevel = 1
smtp_tls_note_starttls_offer = yes

smtpd_tls_auth_only = yes
smtpd_use_tls = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
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
smtpd_recipient_limit = 16
# how many error before back off.
smtpd_soft_error_limit = 3
# how many max errors before blocking it.
smtpd_hard_error_limit = 12
# Requirements for the HELO statement
smtpd_helo_restrictions = permit_mynetworks, warn_if_reject, reject_non_fqdn_hostname, reject_invalid_hostname, permit
# Requirements for the sender details
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, warn_if_reject, permit
smtpd_data_restrictions = reject_unauth_pipelining
# require proper helo at connections
smtpd_helo_required = yes
# waste spammers time before rejecting them
smtpd_delay_reject = yes
disable_vrfy_command = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
smtpd_sasl_authenticated_header = yes
smtpd_client_restrictions =
   permit_mynetworks, permit_sasl_authenticated,
   sleep 1, reject_unauth_pipelining
dovecot_destination_recipient_limit = 1
header_checks = regexp:/etc/postfix/header_checks
enable_original_recipient = no
myhostname = cyrcee.lunae.community
mydestination = localhost, localhost.localdomain, $myhostname, $mydomain
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 151.80.47.124
mynetworks_style = host
relayhost =
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination
masquerade_domains = mail.lunae.info mail.lunae.community
masquerade_exceptions =
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination
inet_protocols = ipv4

And here the relevant master.cfg :

smtp      inet  n       -       n       -       -       smtpd
5025      inet  n       -       n       -       -       smtpd
amavis      unix    -       -       -       -       2       smtp
        -o smtp_data_done_timeout=1200
        -o smtp_send_xforward_command=yes
        -o disable_dns_lookups=yes
        -o max_use=20
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_delay_reject=no
        -o smtpd_data_restrictions=reject_unauth_pipelining
        -o smtpd_end_of_data_restrictions=
        -o mynetworks=127.0.0.0/8
        -o smtpd_error_sleep_time=0
        -o smtpd_soft_error_limit=1001
        -o smtpd_hard_error_limit=1000
        -o smtpd_client_connection_count_limit=0
        -o smtpd_client_connection_rate_limit=0
        -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
submission inet n       -       -       -       -       smtpd
smtps     inet  n       -       -       -       -       smtpd

Here the log when trying to send an email to local from outside :

Aug 28 02:42:22 cyrcee postfix/smtpd[26836]: connect from mail-io0-f170.google.com[209.85.223.170]
Aug 28 02:42:23 cyrcee postfix/smtpd[26836]: Anonymous TLS connection established from mail-io0-f170.google.com[209.85.223.170]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Aug 28 02:42:23 cyrcee postfix/trivial-rewrite[26839]: warning: do not list domain lunae.community in BOTH mydestination and virtual_mailbox_domains
Aug 28 02:42:24 cyrcee postfix/smtpd[26836]: warning: lookup selune@lunae.community, NIS domain lunae.info, map mail.aliases: internal yp server or client error
Aug 28 02:42:24 cyrcee postfix/smtpd[26836]: warning: nis:mail.aliases lookup error for "selune@lunae.community"
Aug 28 02:42:24 cyrcee postfix/smtpd[26836]: NOQUEUE: reject: RCPT from mail-io0-f170.google.com[209.85.223.170]: 451 4.3.0 <selune@lunae.community>: Temporary lookup failure; from=<gwenaelle.brosseau@gmail.com> to=<selune@lunae.community> proto=ESMTP helo=<mail-io0-f170.google.com>

Two days I am keeping trying different configurations, but no way to solve the issue :(

Thanks for your help !

Regards,

Selune

masegaloeh
  • 17,978
  • 9
  • 56
  • 104
Selune
  • 19
  • 5
  • I think you'll need to post the complete Postfix configuration. – Michael Hampton Aug 28 '15 at 00:33
  • Just added the WAN IP in mynetworks, I have no relay access denied anymore in the webmail. But the mail isn't delivered tho : amavis[18578]: (18578-17) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/lib/amavis/tmp/amavis-20150827T144245-18578-Gyitgnfu/parts: lstat() failed: Permission denied. ERROR\n" – Selune Aug 28 '15 at 00:37
  • Here my last log : E7D713C009B: to=, relay=local, delay=1134, delays=1134/0.01/0/0, dsn=4.3.0, status=deferred (alias database unavailable) I don't understand why it says the database is unavailable ! – Selune Aug 28 '15 at 01:34
  • You might want to post more information about the contents of main.cfg and about what directory you are using and stuff. – Falcon Momot Aug 28 '15 at 01:34
  • Okay, just edited the post with the full main.cfg file, including the directories used and stuff :) – Selune Aug 28 '15 at 01:44
  • I commented the amavis content filter in main.cfg but now have the "database unavailable" issue – Selune Aug 28 '15 at 01:51
  • Please post **one** question per thread. Your original question was about "relay access denied" error. It was resolved by answer in [another question linked above](http://serverfault.com/questions/711588/postfix-relay-access-denied-how-to-fix-it). Post the another question about "alias db" in another one by clicking [Ask Question](http://serverfault.com/questions/ask) button. – masegaloeh Aug 28 '15 at 04:06
  • Okay. I'm sorry. I didn't know the policy. Thanks for your answer. – Selune Aug 28 '15 at 04:10

0 Answers0