That would be nice to at least have the option to turn off subscriptions.
I dont remember to be honest. It was over a year ago at this point. I remember going through a few different tutorials to try to get it to work, settings required ,etc. I cant find which ones i used now though and what what the block wall i ended up at.
I think a lot of confusion was at the point that i am only trying to send out activation emails and subscriptions. I could care less about incoming mail, in fact i would send them to null.
I know i did something weird and mixed Gmail SMTP with sendmail or postfix. I think i used sendmail as relay
apt-get install sendmail mailutils sendmail-bin
mkdir -m 700 /etc/mail/authinfo/
cd /etc/mail/authinfo/
AuthInfo: "U:root" "I:YOUR GMAIL EMAIL ADDRESS" "P:YOUR PASSWORD"
makemap hash gmail-auth < gmail-auth
sendmail.mc
define(`SMART_HOST',`[smtp.gmail.com]')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl
define(`confAUTH_OPTIONS', `A p')dnl
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash -o /etc/mail/authinfo/gmail-auth.db')dnl
I know that setting this all up was just a relay to SMTP anyways....but i have no idea what im doing let alone if this is just a relay, setting up sendail or postfix to handle it directly seems way too complicated. And now my sendmail is mixed up with gmail SMTP.
EDIT:
actually im not sure. Because if i do this
$ echo "This is the body of the email" | mail -s "This is the subject line" EMAILADDRESS
i get an email from one of the gmail accounts.
ok lets start at the beginning, reinstalled postfix again, didnt get any prompts so i forced it
metulburr ~ $ sudo dpkg-reconfigure postfix
* Stopping Postfix Mail Transport Agent postfix [ OK ]
setting synchronous mail queue updates: false
changing /etc/mailname to python-forum.io
setting myorigin
setting destinations:
setting relayhost:
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_command
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
setting inet_protocols: all
Postfix is now set up with the changes above. If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed. To view Postfix configuration
values, see postconf(1).
After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.
Running newaliases
* Stopping Postfix Mail Transport Agent postfix [ OK ]
* Starting Postfix Mail Transport Agent postfix [ OK ]
Processing triggers for libc-bin (2.19-0ubuntu6.13) ...
metulburr ~ $ sudo postconf -e 'home_mailbox= Maildir/'
metulburr ~ $ sudo postconf -e 'virtual_alias_maps= hash:/etc/postfix/virtual'
metulburr ~ $ sudo vim /etc/postfix/virtual
metulburr ~ $ sudo postmap /etc/postfix/virtual
metulburr ~ $ sudo systemctl restart postfix
sudo: systemctl: command not found
metulburr ~ $ /etc/init.d/postfix reload
* Reloading Postfix configuration... postfix: error: to submit mail, use the Postfix sendmail command
postfix: fatal: the postfix command is reserved for the superuser
[fail]
metulburr ~ $ sudo !!
sudo /etc/init.d/postfix reload
* Reloading Postfix configuration... postfix/postfix-script: fatal: the Postfix mail system is not running
[fail]
metulburr ~ $ sudo ufw allow Postfix
Rule added
Rule added (v6)
metulburr ~ $ echo 'export MAIL=~/Maildir' | sudo tee -a /etc/bash.bashrc | sudo tee -a /etc/profile.d/mail.sh
export MAIL=~/Maildir
metulburr ~ $ source /etc/profile.d/mail.sh
metulburr ~ $ sudo apt-get install s-nail
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package s-nail
metulburr ~ $ echo "deb http://in.archive.ubuntu.com/ubuntu/ xenial universe" | sudo tee -a /etc/apt/sources.list
deb http://in.archive.ubuntu.com/ubuntu/ xenial universe
metulburr ~ $ sudo apt-get update
metulburr ~ $ sudo apt-get install s-nail
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
s-nail : Depends: libssl1.0.0 (>= 1.0.2~beta3) but 1.0.1f-1ubuntu2.23 is to be installed
Depends: libtinfo5 (>= 6) but 5.9+20140118-1ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
I am currently having a problem with s-nail. I dont know if i need it or if i can bypass that aspect or not? I am assuming i need it as if i do this
echo 'init' | mail -s 'init' metulburr
it runs, but doesnt create the Maildir structure in my home.