Tag Info

Hot answers tagged

17

I found much simpler the use of sSMTP In Debian based systems: apt-get install ssmtp Then edit the configuration file in /etc/ssmtp/ssmtp.conf A sample configuration to use your gmail for sending e-mails: # root is the person who gets all mail for userids < 1000 root=your@email.com # Here is the gmail configuration (or change it to your private ...


10

127.0.0.1 is not the "outside world", it is looking around inside the house. Check your firewall configuration (iptables in Linux today), most of them shouldn't be accessible from the ouside. Don't run services you don't need. Uninstall all not required software. Change passwords to be stronger. Check your usage of the system, don't go chasing any ...


10

Determine your exposure Taking your output from the netstat command, what looks like a lot of services is actually a very short list: $ netstat -lntup | awk '{print $6 $7}'|sed 's/LISTEN//'| cut -d"/" -f2|sort|uniq|grep -v Foreign avahi-daemon:r dhclient dropbox nmbd rpcbind rpc.statd smbd sshd Getting a lay of the land Looking at this list there are ...


9

There are several choices of minimal, relay-only mail transfer agents (MTAs, or "mail servers"), some of which have been mentioned in other answers: msmtp http://msmtp.sourceforge.net/ nullmailer http://untroubled.org/nullmailer/ (my personal favourite) esmtp http://esmtp.sourceforge.net/ (unmaintained) sSMTP http://packages.debian.org/source/sid/ssmtp (no ...


9

Assuming you need a program you can run from the shell like sendmail(8), perhaps MSMTP will fit your needs? It can connect to a remote SMTP server and submit mail it gets as stdin, just like sendmail.


7

I would suggest Postfix, especially on Debian where postfix is split into several packages. You can choose and trim features as necessary. Postfix is powerful, modular, highly secure, lightweight, extensible and easy to configure. On my VPS with 256MB of RAM, the postfix daemons collectively use about 6.5MB of resident memory which includes TLS and PCRE ...


5

For postfix: Add the IP for your external mail-relay to /etc/hosts and add an alias mailrelay to it. Modify the postfix configuration: relayhost = [mailrelay] smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth smtp_sasl_security_options = noanonymous Edit /etc/postfix/smtp_auth mailrelay login:password Convert into ...


5

smtpd is executed by Postfix to handle incoming mail (either locally, or remotely). If you have 100 running at a time, I suggest your server is handling a lot of mail. If you don't believe you're generating that much mail, it's possible your server is either receiving a lot of mail it bounces, or it's sending a lot of mail you're not aware of. The default ...


5

ESMTP is a relay only mail transfer server that may work for your application.


5

While it isn't SSH's pubkey authentication (which is something that only exists in the SSH protocol, not SMTP), you could set up TLS Client certificates. This will require a valid SSL certificate on the client side. Also, if you must use SSH's pubkeys, you could simply allow all mail connections from localhost on your personal SMTP server, and set up an ...


5

IMHO, the easiest way to do this is to install postfix (if debconf asks you questions, pick "internet site"), then run these commands: postconf -e relayhost=other.mailserver.com postconf -e mailname=my.domainname.com As long as the SMTP server specified in relayhost doesn't require authentication, allows you to relay or is a valid destination for the ...


5

msmtp seems to understand aliases, see http://msmtp.sourceforge.net/doc/msmtp.html#aliases . It seems just a matter of correct configuration.


5

In the Unix/Linux world you won't find tools that "do everything", as that violates the single responsibility principle. However, to "orchestrate" all the tools together in a single configuration panel, there are projects like Webmin that provide this functionality. For this specific task of mail/groupware, I have the following suggestion. You could look at ...


5

RFC 5321 defines this in section 3.2: So basically you can send EHLO which should be answered by the mailserver with a list of extended capabilities, including valid encryption algorithms. Should the server not understand EHLO, it is propably an older system, that just accepts HELO. I did not read any further than this, whether the old systems can be asked ...


5

SMTP and ESMTP (the underlying protocols) that handle mail delivery have extensive RFCs (the original being RFC821, and more modern update RFC2821 and a Internet standards track protocol in RFC5321). How mail servers deal with errors during delivery varies from mail server to mail server. Adding to the complication is the fact that a lot of them are ...


5

The format of the message is RFC 2282, the Internet Message Format. The file format sounds like you're describing the mbox format, which is RFC 4155. According to RFC 4155, a new message in an mbox database begins with the From keyword, a single space then the address of the reported sender, a single space and the UTC date of when the message was received. ...


4

Honestly, this sounds like a sendmail.cf problem, as if it's not configured for non-local email, or it's misconfigured. The file /var/log/maillog.3 is almost certainly an "old" log file, and therefore, nothing new will get written to it. You didn't mention what Linux distro, BSD or Unix you're using, but the current log file, the one sendmail currently ...


4

Check out this tool Fail2Ban, it scans log files for malicious activity and fires off an event. There is bottled event handlers like creating a firewall to reject the offending IP, or you can make your own custom event handlers.


4

When using smtp submission on port 587 the value for smtp_url should start with "smtp://", i.e. not with "smtps://". It is also important to make sure ssl_starttls is set to "yes", as correctly done in the config above. While setting up my own server I got the exact same problem. Having access to logs on both the client & the server side made it obvious ...


4

You have a rule to let the traffic out, but you don't have a rule to let the return traffic in. I'm guessing you meant for these 2 rules to be -A INPUT instead: iptables -A OUTPUT -p tcp --sport 25 -j ACCEPT iptables -A OUTPUT -p tcp --sport 587 -j ACCEPT However using the source port as a method of allowing return traffic in is a bad way to secure the ...


4

The biggest difference between POP3 and IMAP from a user's perspective is that POP3 is designed to hold mail until the client (Thunderbird in this case) downloads the mail, at which point it's removed from the POP3 server (it can be configured to do otherwise, but that's not the norm). IMAP on the other hand, is the opposite. It is designed to be the ...


3

What you're actually doing is asking how to set the ports used Postfix so that it is also listening on tcp/587, which is the "submission" port. I have the following in my /etc/postfix/master.cf: submission inet n - n - - smtpd -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o ...


3

My favorite is the email (github) client. It's really simple, no complex configuration needed, no dependencies needed. And you can specify smtp-server argument via command line, which means it's more suitable for scripting. The only pity is that most linux distributions does not contains this tool, so you need to compile it yourself. Quotes from email ...


3

The error you quoted from the error log indicates that Postfix is unable to connect to the MySQL server on 127.0.0.1. This is because you told the MySQL server not to listen on 127.0.0.1. The high process count is probably due to repeated failed attempts to query MySQL for virtual-mailbox lookups. You need to tell Postfix to try to connect to the MySQL ...


3

In order to forward root's e-mails to another e-mail address, you could change the line related to root in the file /etc/aliases. For instance: root: myname@myemail.com To forward e-mails of a UNIX user (let say myuser) to another e-mail address (myname@myemail.com), had the file .forward in the home folder of myuser. This file should contain one line ...


3

You could switch to esmtp, there it is pretty trivial: identity myself@gmail.com hostname smtp.googlemail.com:25 username "myself@gmail.com" password "secret" starttls enabled default identity mysecondaccount@gmail.com hostname smtp.googlemail.com:25 username "mysecondaccount@gmail.com" ...


3

If you are asking "What is the way to connect to an SMTP server using SSH instead of telnet?" the answer is there is none. SSH only communicates over ports using the SSH protocol. Using it to connect to any other port will fail, because SSH will try to speak the SSH protocol, which will not be understood by an SMTP server (or FTP, or other server ...


3

You're sending email to gmail accounts from this address: Admin@validdomain.com The domain "validdomain.com" you're sending from does not have an SPF record setup for it. You have 1 of 2 options: Change the server's mailer so that its outgoing mail uses a domain that is allowed Set up an SPF record for validdomain.com You can use this tool to see ...


3

That error message is appearing because the mail client is sending only a bare hostname ("PLLAMNAZIFE") rather than a fully-qualified hostname (e.g. "PLLAMNAZIFE.example.com") in the HELO/EHLO part of the SMTP transaction, and your postfix server is configured to reject such mail. Many mail client programs do not send correctly formatted, fully-qualified, ...


3

Postfix is an SMTP server and should do the job fine, no need for an extra SMTP server. You should just have postfix deliver the emails directly to the domains involved, the users should be known there (if they are not, then drop the registration because it is fake). In particular you should not setup a relayhost entry in /etc/postfix/main.cf unless you ...



Only top voted, non community-wiki answers of a minimum length are eligible