On Mon, 23 Feb 2015 21:40:50 -0600, Sunshine wrote:
> I guess that's why you guys had suggested postfix, whatever that
> is (I had heard of sendmail, but not postfix).
Postfix is a very powerful MTA with lots of flexibility.
You may want to bookmark
http://www.postfix.org
> Googling for postfix gmail setup for Kubuntu, this may work:
Yeah, finally. Nice to know what distribution you are using.
I think those urls could use at least one more setting if not two.
The first is to have any root email's sent to your account.
Here you can see I have set bittwister to have root's email sent to me
# tail -11 /etc/postfix/aliases | head -5
# Person who should get root's mail. This alias
# must exist.
# CHANGE THIS LINE to an account of a HUMAN
root: bittwister
Once you have changed /etc/postfix/aliases
cd /etc/postfix/
postalias aliases
The other thing I can suggest is using generic to munge the email
header from suns...@my.antispam.invalid to
rea...@gmail.com.
After changing generic, run
postmap generic
That way when you do something like
mail -s "Test generic"
you...@gmail.com < /dev/null
in a sunshine terminal you should see
From: containing
you...@gmail.com instead of
suns...@my.antispam.invalid which will not route for anyone wanting
to do a reply.
Here are some changesnippets from my
main.cf which I think you might
find helpful.
# dif /var/local/vorig/etc/postfix/main.cf_vinstall /etc/postfix/
main.cf
35a36,102
>
> #*****************************************************************
> # My changes appended to
main.cf for my LAN nodes
> #
> # Modified aliases, generic, and created a smtp_auth file.
> # dovecot is my IMAP server
> #
> # Do a tail -12 /etc/postfix/aliases
> # you need to change postfix to your login id
> # and create the .db file with the command
> # postalias aliases
> # postfix reload
> #
> #*****************************************************************
>
> # #*************************************************
> # #*
> # #* If file changes be sure to change
> # #* /local/bin/postfix_changes
> # #*
> # #*************************************************
>
> mydestination = $myhostname localhost.$mydomain localhost $mydomain
> mynetworks =
127.0.0.0/8 192.168.0.0/24
>
>
> relayhost =
smtp-server.MY.ISP.com
> relay_domains =
> inet_interfaces = all
> inet_protocols = ipv4
> unknown_local_recipient_reject_code = 550
> smtp_host_lookup = dns, native
>
> masquerade_exceptions = root
>
> default_destination_concurrency_limit = 1
> default_destination_recipient_limit = 3
>
> #*****************************************************************
> # Sending: swap out email addresses that appear inside messages (From:)
> # Recipients doing a reply, sends reply to second column.
> # Added a line like
> # bittw...@wm81.darkstar.test
my_addy@sys_isp.net
> # to the generic file and create the .db file with the command
> # postmap generic
> # postfix reload
> #
> # file:///usr/share/doc/postfix/html/generic.5.html
> #
> #*****************************************************************
> smtp_generic_maps = hash:/etc/postfix/generic
Do look up the directives at
http://www.postfix.org so you know what
they do.
Although your FQDN is correct for what you are doing, I would suggest
changing it to .test instead of .invalid.
Example:
$ hostname --fqdn
wb.home.test