Friday, January 28, 2011

Dragon Ball Doujinshis Yaoi

Configure exim4 to send mail through Gmail

Logcheck is an excellent tool to monitor the logs of Ubuntu makes it a summary by saving only the important lines, and we mail it to the address defined in its configuration.

Installing logcheck we can get it from synaptic (the package manager) for the configuration instead you can find a good guide here (the first page regarding the installation on Debian ; from the second page is processed the configuration that fits easily even in Ubuntu).

Yeah, but that has to do with logcheck exim4? Got to do, got to do, for the simple fact that installing logcheck , Ubuntu also installed, as a dependency, the package exim4 to manage email summary that will send you, and you may get, as it happened to me that there is enough that those messages are forwarded to your local address (as it does by default), but rather would like them to be delivered to your Gmail address , so 'can be inspected when you're in front of your PC.

How?

The procedure is not very simple, but if you follow my instructions step by step, together we will reach our goal. Be always a

copia dei files che andrete ad editare, prima di modificarli e salvarli.

Pronti? Procediamo.

Fase 1

  • da terminale, digitate sudo dpkg-reconfigure exim4-config
  • si aprirà un wizard, che vi guiderà passo passo nella configurazione di exim4; in questa guida eviterò di citare le pagine (come la prima che vi appare) nelle quali dovete solo dare un OK per andare avanti, tanto non si può fare altro e quindi non potete sbagliarvi
  • alla prima scelta che si presenta, scegliamo posta inviata tramite uno «smarthost»; ricevuta via SMTP o fetchmail
  • nella the next page you will be asked the domain name of the local machine, or that part of the name following the @ in any local address (example: if your local address is foo @ mycomputer the domain name is mycomputer ). To be clear, your local address is the one that appears behind the command prompt when you open a terminal, my (Nirvanalx) you can see in the image below. However, the wizard should let you find ready, so just give Enter


  • the next question concerns the IP addresses on which to wait for SMTP connections entry: here you have to answer 127.0.0.1
  • the next page (Other destinations for which mail is accepted) you can leave it blank and press Enter
  • same thing to the next field (systems for which do the 'relay') leave the field blank and press Enter
  • you will be asked immediately after the IP address or hostname for the 'smarthost' Out: Here you must enter smtp.gmail.com:: 587
  • to the next question (Omit the local mail name from outgoing messages?) say NO
  • after a couple of items, you will be asked whether to keep minimizing the number of DNS requests (dial-on-demand), here you have to respond to the request for NO
  • mode of delivery for local mail choose mbox format in / var / mail /
  • then asks if split configuration into small files, say NO
  • the last request (addressed mail for root and postmaster) you can leave it blank and press Enter
  • at this point the wizard will finish and then restarts the service automatically mail (MTA)

Well, it's over? Would you like to ... now we can move to Step 2



  • sempre da terminale con permessi di root, editate il file /etc/exim4/exim4.conf.template digitando

           gksu gedit /etc/exim4/exim4.conf.template &

  • trovate la riga ".ifdef DCconfig_smarthost DCconfig_satellite" , e in quella sezione (prima della riga ".endif" ) aggiungete le seguenti righe


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


if the file being edited found that any other smarthost
contains the line "domains =! + local_domains"
must delete or comment out (with # beginning of the line) all the rows that
concern, as in the following


  • find the line "begin authenticators" , and add in the following lines under
gmail_login:
driver = plaintext
; public_name = LOGIN
client_send =: \u0026lt;IP gmail>: \u0026lt;password>

replacing fields "\u0026lt;recipient gmail>" and "\u0026lt;password>" with your data
  • look if there are other authenticators that contain the same line "public_name = LOGIN" , if any, delete them or comment
  • seeking comment
"# # # transport/30_exim4-config_remote_smtp_smarthost"

below and add in that section

gmail_smtp:
driver = smtp
port = 587
hosts_require_auth = $ host_address
hosts_require_tls = $ host_address
  • the bottom of the file, there is a section that begins with this line
. AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS ifndef "

and ends after 31 rows with a . "endif" : Well, this whole section should be deleted or commented
(note that those lines there
are two games from the first to comment) as you can see in the next screenshot


  • Save and close the file

And now we are ready to proceed to the next phase (worry, we're almost done):

Step 3
  • terminal, run sudo update-exim4 . conf
  • and then run sudo / etc/init.d/exim4 restart

If you see error messages, it means that everything is ok now your ready to exim4 send mail via G mail .
To test the operation quickly, shipped an email from the command line and then check in your Gmail box if you receive:

echo "Hello, how are you?"
Gmail
as the recipient of messages.
important note, remember that Gmail allows you to send up to 100 messages per day for each account using SMTP, so be careful not to overdo it!

0 comments:

Post a Comment