Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/feed-rss2.php on line 8
Setup Exim to Send Email Using Gmail in Debian – AKLWEB HOST LLC Support Center https://support.aklwebhost.com Fri, 06 Dec 2019 14:39:31 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.4 Setup Exim to Send Email Using Gmail in Debian https://support.aklwebhost.com/knowledgebase/setup-exim-to-send-email-using-gmail-in-debian/ https://support.aklwebhost.com/knowledgebase/setup-exim-to-send-email-using-gmail-in-debian/#respond Fri, 06 Dec 2019 14:39:31 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2574 Port 25 in AKLWEB Host is blocked by default. If you need to send out email without contacting AKLWEB Host support, you can follow this tutorial to setup your Exim to send email via Gmail SMTP server.

Install Exim4

apt-get install exim4

Configuration

Run following command to configure Exim4.

dpkg-reconfigure exim4-config

Choose this option when asked: “mail sent by smarthost; no local mail”.

Fill in the rest of the fields:

System mail name: YOUR_HOSTNAME
IP-addresses to listen on for incoming SMTP connections: 127.0.0.1 ; ::1
Other destinations for which mail is accepted: <BLANK>
Visible domain name for local users: <BLANK>
IP address or host name of the outgoing smarthost: smtp.gmail.com::587
Keep number of DNS-queries minimal (Dial-on-Demand)? No
Split configuration into small files? No
Root and postmaster mail recipient: <BLANK>

Open and edit /etc/exim4/exim4.conf.template.

Search for:

.ifdef DCconfig_smarthost DCconfig_satellite

Then add these lines after it:

send_via_gmail:
    driver = manualroute
    domains = ! +local_domains
    transport = gmail_smtp
    route_list = * smtp.gmail.com

Remove other smarthost blocks that contains domains = ! +local_domains.

Search for:

begin authenticators

And add these lines after it:

gmail_login:
    driver = plaintext
    public_name = LOGIN
    client_send = : YOUR_GMAIL_ACCOUNT@gmail.com : YOUR_GMAIL_PASSWORD

Remove other authenticator blocks that contains public_name = LOGIN.

Search for:

transport/30_exim4-config_remote_smtp_smarthost

And add these lines after it:

gmail_smtp:
    driver = smtp
    port = 587
    hosts_require_auth = $host_address
    hosts_require_tls = $host_address

Save and close /etc/exim4/exim4.conf.template.

Apply the new configuration:

update-exim4.conf

Restart Exim4 service:

/etc/init.d/exim4 restart

Testing

Now send a test email using following command:

echo 'Test Message from AKLWEB Host.' | mail -s 'Test Message' YOUR_EMAIL_ADDRESS

Check /var/log/exim4/mainlog if any errors occurred. You can now send emails from your AKLWEB Host VPS.

]]>
https://support.aklwebhost.com/knowledgebase/setup-exim-to-send-email-using-gmail-in-debian/feed/ 0