how to get the number of lines in a file, nano editor | Debian | pengertian Fail2Ban


Gmail smarthost with Exim4 on Debian

Gmail smarthost with Exim4 on Debian

Image source: Gmail logo

Setting up your Linux workstation or a virtual machine, there is no public IP or domain available. If you want to send mail from this machine, reverse DNS will fail and you will get the following error message:

Helo command rejected: need fully-qualified hostname

To avoid this situation, exim4 (the default Debian MTA) can be adjusted to use SMARTHOST (in this case a gmail account, but any other smtp server can be used).


Configure exim4 as following:

dpkg-reconfigure exim4-config
(click for full image)
(click for full image)
(click for full image)
(click for full image)
(click for full image)
(click for full image)
(click for full image)
(click for full image)
(click for full image)
(click for full image)


Create the file passwd.client

nano /etc/exim4/passwd.client

with the following contents


NOTE: if the password contains special characters ($, \, {}) you have to escape them. A simple solution is to use a strong password, but without dollar, closing brace, backslash, e.g. something like Nca-PZRn2_kfqW

Test it

Send a test mail to your email account

mail -s 'test my setup'

Press CTRL+D to exit

Check log file

tail /var/log/exim4/mainlog
2014-07-26 21:02:21 1S0dvp-0001Ce-2Z <= root@atlas U=root P=local S=317
2014-07-26 21:02:27 1S0dvp-0001Ce-2Z => R=smarthost T=remote_smtp_smarthost [] X=TLS1.0:RSA_ARCFOUR_SHA1:16 DN="C=US,ST=California,L=Mountain View,O=Google Inc,"
2014-07-26 21:02:27 1S0dvp-0001Ce-2Z Completed

Related Posts

You may also be interested in

Sign-up for our free email newsletter. Get updates when new tutorials and tips are published. You can unsubscribe anytime with a click.

Your comments are welcomed!

This site actively encourages commenting on any post. Comments are not pre-moderated, but this community does not tolerate direct or indirect attacks, name-calling or insults. Please, read terms of use and Comment Policy at privacy policy.

How to Install PostgreSQL 9.3 on Debian 7 Wheezy How to setup OpenVPN on Debian server