Configuring Post Fix

I moved and to a Linode VPS.

The contact form for Consolidated Utilities emails email addresses that end in @consolidatedutilities.com.

I am creating a website at . I am going to use the Laravel Cashier to do online bill pay for customers.

I wanted to test the postfix configuration, because I felt like it would only work for accounts that ended with the server domain name.

I installed Wordpress and Contact Form Seven, and it is not sending emails to babbott@unademy.com. I do not have the ability to test it sending emails to @effinghamministorage.com.

Is there a way to configure postfix to send emails to the address of the server name, as well as other addresses?

Here are my settings

  GNU n# 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

# TLS parameters

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

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = localhost.members.linode.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
inet_protocols = all

Open in new window

burnedfacelessAsked:
Who is Participating?
 
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Take a look at my comments in SWAKS + test your mail system first.

Keep in mind, if you're using your own local MTA to actually send messages (no relay like MailGun), then SWAKS targeting your localhost will only tell you when a message is queued.

Then, you'll have to look at your MTA (Postfix) logs to determine what happens when your message is dequeued + actually sent... which means you have to look at the entire dialog between your MTA + external site.

One trick you can play with swaks is to actually target either the lowest priority MX of the site where you're sending or target a specific MX record. For example, take sites running GSuite (Gmail Business), which use the MX records.

@                IN  MX  1    aspmx.l.google.com.
@                IN  MX  5    alt1.aspmx.l.google.com.
@                IN  MX  5    alt2.aspmx.l.google.com.
@                IN  MX 10    aspmx2.googlemail.com.
@                IN  MX 10    aspmx3.googlemail.com.

Open in new window


If you input no specific MX to target, SWAKS will default to highest priority (lowest number) MX record, so aspmx.l.google.com for this site.

Whenever you're testing mail, test both local hand off to your MTA + sending directly from your IP to highest priority MX of site your testing for mail flow. Then debug the messages coming back.

For example, if you setup a local MTA + try to send to any gmail account, you'll instantly see (by the returned message), why you'll have to warm up your IP + domain or use a relay service.
0
 
burnedfacelessAuthor Commented:
David,
I'm glad you are able to reply on Christmas.

I'm getting a 400 error for SWAKs, can you recheck that link for me?
0
 
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Try this.

Run SWAKS, then cut + paste the entire session + wrap with the CODE operator from the menu.

With this info, likely someone can assist you.
0
 
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
So your complete swaks session will look something like this...

imac> swaks --from=david@davidfavor.com --to=david@davidfavor.com
=== Trying net1.bizcooker.com:25...
=== Connected to net1.bizcooker.com.
<-  220 ready ESMTP
 -> EHLO davids-imac.local
<-  250-net1.bizcooker.com Hi nxdomain [136.62.164.224]
<-  250-PIPELINING
<-  250 8BITMIME
 -> MAIL FROM:<david@davidfavor.com>
<-  250 <david@davidfavor.com>, sender OK - how exciting to get mail from you!
 -> RCPT TO:<david@davidfavor.com>
<-  250 <david@davidfavor.com>, recipient ok
 -> DATA
<-  354 go ahead
 -> Date: Mon, 25 Dec 2017 17:09:16 -0600
 -> To: david@davidfavor.com
 -> From: david@davidfavor.com
 -> Subject: test Mon, 25 Dec 2017 17:09:16 -0600
 -> Message-Id: <20171225170916.023284@davids-imac.local>
 -> X-Mailer: swaks v20170101.0 jetmore.org/john/code/swaks/
 -> 
 -> This is a test mailing
 -> 
 -> .
<-  250 Queued
 -> QUIT
<-  221 net1.bizcooker.com closing connection. Have a wonderful day.
=== Connection closed with remote host.

Open in new window

0
 
burnedfacelessAuthor Commented:
David,
Your comments will help me get better. You're really making the $10 a month I spend worth it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.