SMTP Server Configuration

Hello list,

I want to be able to send email directly from my linux box. I have both a CentOS and Debian installation. I am by no means an expert when it comes to all of the SMTP servers. I have been testing different configs by installing and uninstalling sendmail, postfix, and exim4.

Network: My servers all sit behind NAT with a private IP address and they are not resolvable from the internet.

Requirement: I want to be able to send emails directly from the SMTP service without having to rely on an SMTP smarthost such as google. This is a "send only" requirement.

In my testing, the only configuration I was able to get to send outbound email was through my "paid for" Google SMTP smarthost. And even then I was unable to send email to domains outside of Gmail from my linux box. And I want to avoid relying on an SMTP smarthost.

I have used mutt/mail before with exim and others before without any prior configuration. But just my luck, when I want it to work it just doesn't work at all.

Has anyone got a working config for any of the email servers or a recommendation on what I should configure, or anything I am doing wrong. I have using the following basic guide and googling for solutions:

How To Install and Configure Postfix as a Send-Only SMTP Server on Ubuntu 14.04 | DigitalOcean

There are two distinct errors, one of which is this one:

smtp[29216]: B302E4077585D: to=<email@example.com>, relay=none, delay=15561, delays=15560/0.03/0.1/0, dsn=4.3.5, status=deferred (mail for localhost loops back to myself)

In another configuration, the error tells me something like "A fully qualified is required" (sorry I don't have access to this error to post right now, but can post later)

The command I am using is the following, but I have also tried with "mail." Although I'm sure this has nothing to do with the command I am using. The same errors in the log occur what ever variation of the command I use.

mutt email@example.com -s "Subject" < body.txt

As always, this has to be something really simple!
Thanks!
:slight_smile:
Ll

Bad News here

It's common practice to block mail servers from private internet connections with dynamically assigned IP addresses. You'll have a lot of rejections for valid mails. Nothing you can do about it. Fighting Spam means making it hard for spammers to send emails - at the same time making it hard for everybody to send emails.

And don't even try to send mails without a proper set up mail server(rdns, SMTP-Banner, Relay-Restriction,...). Connection will be dropped, faster than your mailer can say HELO.

IMO is using a smarthost one of the easier alternatives here.

There are inexpensive commercial solutions.
Postmark � Unmatched email delivery & troubleshooting