Configuring Linux system mail submission

Peter Lebbing peter at
Sat Feb 16 12:46:22 CET 2019

Hi André,

On 16/02/2019 10:34, André Ockers wrote:
>> /etc/mailname: (the actual fully qualified
>> domain name of the local host)
> So what do you do here if you have an emailadress, like
> andre at
> at an email service provider, let's say
> Would that be or in /etc/mailname?

The more domain names, the merrier!

There is no single right answer. These names are used to build e-mail
addresses when you don't specify a fully valid e-mail address when you
send the mail; both for the sender and the recipient addresses. As I
indicated in the previous mail, I think you should avoid the situation
where nullmailer will build e-mail adresses on a domain you don't
control yourself, to prevent annoying people who happen to have the
address that nullmailer builds.

This all simply does not apply to caff, and caff is our intended goal.
But configuring nullmailer might also cause daemons on your computer to
try and start sending e-mails, and that is where it does apply.

I've gone through several iterations of this e-mail. The thing is,
there is no single right answer. There are multiple wrong answers. And
my system is configured differently than yours, so I can't just say
"this works for me", since I know for a fact it will not work for you.
I'm sorry if I'm confusing you. I'm doing my best, but I'm simply not
sure of the *best* solution in this case.

So I hope that this is the best outcome:

First, let's see what your computer thinks it is called. Invoke this:

$ hostname --fqdn

It will give you the domain name of the computer. Let's say this

$ hostname --fqdn

Then let's put this in the files:

/etc/nullmailer/adminaddr: andre at

This will cause any e-mails addressed to some-username at mario,
some-username at and some-username at localhost to end up being
delivered to andre at They might not succeed, though, because
your e-mail provider might very well reject the sender of the mail. You
should probably check every now and then whether there is anything stuck
in /var/spool/nullmailer/queue.  You can delete any files there and it
will stop trying to deliver that e-mail. You do need to be root to
delete them.

Note that Postfix would probably not do better at delivering those
e-mails. It could be configured to do so, but by default it would not.

And the idhost line prevents the name from ending up in
the e-mail headers (specifically, the Message-ID line). It mirrors your
current e-mail setup, which I could see in your e-mail headers. Some
people don't like names from their internal network leaking out to the
big bad internet. But it might still happen in other places.

>> /etc/nullmailer/remotes: smtp --port=587 --starttls --user=peter-nullmailer --pass=[...]
>> That last one is the really important one. It uses the SMTP submission
>> port, STARTTLS, and in my case a password that has been chosen to not
>> require quotes. But you can use quotes to just use your provider account
>> password.
> Would that be
> smtp --port=587 --starttls
> --user=andre-nullmailer --pass=...
> or
> smtp --port=587 --starttls --user=andre-nullmailer --pass=...
> in /etc/nullmailer/remotes?

This is the same as when configuring your e-mail client. If your e-mail
service provider has given you the following outgoing mail server

Outgoing mail server:
User name: some-username at
Password: lalala

Then the line becomes

/etc/nullmailer/remotes: smtp --port=587 --starttls --user=some-username at --pass=lalala

Some providers will use a full e-mail address as user name, others just
the bit before the @.

You could take a look in your e-mail client software (which clearly
works) and see what it has there for outgoing mail server settings. That
probably will not show you the password right away.



I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at <>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Gnupg-users mailing list