Mail server setup help?
#1
So I'm a little embarrassed this has stumped me. I've never set up a mail server before, though and I'm having some trouble. I don't want a full mail server at this point, I just want to send outbound notifications to myself, so I'm not linking this to a valid domain name.

First, I installed postfix , since that seemed to be the consensus as the best option. And.... that's where I'm stumped. The mail command just hangs when I try to send a test message to my Gmail account, and I'm sure I need to set up some parameters in the /etc/postfix/main.cf config file but I'm struggling to figure it out what exactly.

I've looked at this, but I'm not really seeing an answer there. Also, I should add that it appears postfix is running OK:

Code:
inetv@pine64pro:~$ sudo systemctl status postfix
postfix.service - LSB: Postfix Mail Transport Agent
 Loaded: loaded (/etc/init.d/postfix)
Drop-In: /run/systemd/generator/postfix.service.d
         └─50-postfix-$mail-transport-agent.conf
 Active: active (running) since Sun 2016-05-29 11:41:07 UT
ago
Process: 1851 ExecStart=/etc/init.d/postfix start (code=ex
tus=0/SUCCESS)
 CGroup: /system.slice/postfix.service
         ├─2092 /usr/lib/postfix/master
         ├─2093 pickup -l -t unix -u -c
         └─2094 qmgr -l -t unix -u

ay 29 11:41:07 pine64pro postfix[1851]: Starting Postfix Ma
ay 29 11:41:07 pine64pro postfix/master[2092]: daemon start
ay 29 11:41:07 pine64pro systemd[1]: Started LSB: Postfix M
int: Some lines were ellipsized, use -l to show in full.

I've also installed sendmail because it didn't appear to be installed, but I still get a "command not found" error when I try to use it from the command line. mail gives no such error, but just hangs and never sends the message.

I thought this would be easy! I'm sure I'm doing some simple dumb mistake, though. Any help would be very appreciated.
  Reply
#2
if you are looking for a mail config with webmail and control panel included try the following (probably the easiest way to manage things for new users). You can also manage DNS/Hosting/MySQL.

Substitute IP addresses with your network range.

Debian Jessie (Apache)
https://www.howtoforge.com/tutorial/perf...pconfig-3/

Ubuntu Xenial (Apache)
https://www.howtoforge.com/tutorial/perf...ispconfig/
If you like my work be sure to check out my site or wish to donate to the cause

Cheers Big Grin
  Reply
#3
Actually i just want something i can call from the command line for a cronjob.
  Reply
#4
(05-29-2016, 01:43 PM)wahdooyah Wrote: Actually i just want something i can call from the command line for a cronjob.

Hi,

I typically use Python to send email through a Gmail account.  It is a simple and useful way to do it.  Below is a website that I just Googled that talks about it.  I have written similar code which I can share, if needed.

http://naelshiab.com/tutorial-send-email-python/
  Reply
#5
Thanks! I may have to go that route, but I was hoping to set it up to send to a .onion recipient, so I just wanted to not use a third party server.
  Reply
#6
FYI, I decided to use the scp command to update log files stored on my Android device instead of emailing notifications. Far more secure anyhow and plays well with torsocks.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)