Hot answers tagged

32

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 ...


14

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 ...


13

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 ...


12

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 ...


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 ...


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.


9

IMHO, the easiest way to do this is with postfix. You can configure it as a light outgoing relay with these commands: postconf -e relayhost=other.mailserver.com postconf -e myorigin=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 recipient address ...


9

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 ...


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 ...


7

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 ...


6

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

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

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


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

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, ...


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. ...


5

The first thing to do in case of SMTP problems where the configuration seems to be OK is that you can actually reach the SMTP server. Use: telnet gmail-smtp-in.l.google.com 25 you should see: Trying 173.194.69.27... Connected to gmail-smtp-in.l.google.com. Escape character is '^]'. 220 mx.google.com ESMTP lv5si9142984bkb.114 - gsmtp (after that type ...


5

The forward and reverse DNS need to match. The name itself does not matter. For example in my domain (ziobro.info) I have a record: rack2 IN A 162.219.7.27 My provider has a record: 27 PTR rack2.ziobro.info. in their corresponding in-addr.arp file. One of my mail domains (ziobro.rochester.ny.us) has the appropriate ...


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

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 ...


4

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 ...


4

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 ...


4

Just replace all routers by one manualroute that points directly to the new MX: begin routers redir: driver = manualroute domains = * transport = remote_smtp route_list = * 12.34.56.78 Here 12.34.56.78 - is an IP-address of your new MX where all messages should go.


4

Try the following test command/script #!/bin/sh /usr/sbin/sendmail -i -v -- myemail@mail.com <<END subject: test test END


4

The master.cf file (usually found in /etc/posfix/master.cf) controls the startup and configuration of specific Postfix services. A configuration like this in that file, according to the documentation, will do what you want: smtp inet n - - - - smtpd -o smtpd_tls_security_level=none -o smtpd_sasl_auth_enable=no smtps inet n - - - - smtpd ...


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 ...



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