0

I have a script that submits form data to my email that works on local host, but not on the server.

main.cf:

# 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 (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

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 3.6 on
# fresh installs.
compatibility_level = 3.6



# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

smtp_tls_CApath=/etc/ssl/certs
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache


smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = Laleesh
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, laleesh.com, Laleesh, localhost.localdomain, localhost
relayhost = [smtp.gmail.com]:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 my.ip.address
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
smtp_tls_security_level = encrypt
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

[enter image description here][1]

Error log:

root@Laleesh:~# sudo tail -f /var/log/mail.log 2024-05-20T14:36:29.322622+00:00 Laleesh postfix/postfix-script[219384]: starting the Postfix mail system 2024-05-20T14:36:29.341896+00:00 Laleesh postfix/master[219386]: daemon started -- version 3.8.1, configuration /etc/postfix 2024-05-20T18:00:00.629191+00:00 Laleesh postfix/smtpd[222598]: warning: hostname apzg-0727-m-044.stretchoid.com does not resolve to address 192.241.224.14 2024-05-20T18:00:00.629629+00:00 Laleesh postfix/smtpd[222598]: connect from unknown[192.241.224.14] 2024-05-20T18:00:00.630053+00:00 Laleesh postfix/smtpd[222598]: improper command pipelining after CONNECT from unknown[192.241.224.14]: MGLNDD_95.179.164.136_25\n 2024-05-20T18:00:00.798252+00:00 Laleesh postfix/smtpd[222598]: lost connection after UNKNOWN from unknown[192.241.224.14] 2024-05-20T18:00:00.798526+00:00 Laleesh postfix/smtpd[222598]: disconnect from unknown[192.241.224.14] unknown=0/1 commands=0/1 2024-05-20T18:03:20.993726+00:00 Laleesh postfix/anvil[222600]: statistics: max connection rate 1/60s for (smtp:192.241.224.14) at May 20 18:00:00 2024-05-20T18:03:20.995564+00:00 Laleesh postfix/anvil[222600]: statistics: max connection count 1 for (smtp:192.241.224.14) at May 20 18:00:00 2024-05-20T18:03:20.995658+00:00 Laleesh postfix/anvil[222600]: statistics: max cache size 1 at May 20 18:00:00

5
  • What is your server config? What does the server log say? Commented May 20 at 18:37
  • I have provided a link to a screenshot of mail.log and the main.cf configuration is above it. Commented May 20 at 18:47
  • Why post the contents of a text file as an image? Please include text AS text in the body of the question. Images are not helpful for searching or copying for recreating your situation. Commented May 20 at 18:51
  • Further, as a convention, the Title is not where the question goes, but should be a helpful bit of initial context. Put a clear question in the post body, including context, configs, things you've tried, outcomes, etc. Commented May 20 at 18:52
  • Ah, sorry about that, I changed it. Commented May 20 at 19:13

0

You must log in to answer this question.

Browse other questions tagged .