LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   exim4 and sendmail? (https://www.linuxquestions.org/questions/debian-26/exim4-and-sendmail-712919/)

kushalkoolwal 03-19-2009 02:37 PM

exim4 and sendmail?
 
I am trying to develop a script which can be used to send emails from my home computer. I don't need to receive any mails just send it.

Right now I am sending emails from my home computer which is on my home LAN (Standard ISP Modem->Router Configuration) using the following command:
Code:

#!/bin/bash
echo "Sending mail through mail..."
echo "Sending Test Email" | mail -s "Hello" testing@test.com
echo "Mail sent"

The mail gets send perfectly fine to any email account (yahoo, hotmail, etc). Here I am using sendmail as the MTA and everything works fine without configuring anything.

However, by default if one tries to install the mailx package (bsd-mailx), Exim4 gets installed as the default MTA instead of sendmail.

Code:

debian-workstation:~# apt-get install mailx
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following extra packages will be installed:
  bsd-mailx exim4 exim4-base exim4-config exim4-daemon-light liblockfile1
  psmisc
Suggested packages:
  mail-reader eximon4 exim4-doc-html exim4-doc-info gnutls-bin openssl
  libmail-spf-query-perl swaks
The following NEW packages will be installed:
  bsd-mailx exim4 exim4-base exim4-config exim4-daemon-light liblockfile1
  mailx psmisc
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 2035kB of archives.
After this operation, 4690kB of additional disk space will be used.
Do you want to continue [Y/n]?

However if use my above script to send emails using exim4 as the MTA the mail does not get sent.

I have tried configuring exim4 using the command:
Code:

dpkg-reconfigure exim4-config
but I get lost in the confusing questions that it asks regarding SMTP, smarthost, configuration

I would like to know how can I send emails using exim4 since it is the default one.

As far as I understand exim4 and sendmail are both MTA and they conflict (naturally) with each other if you try to install any one of them.

omes 03-20-2009 01:48 PM

This might clear up some things: Debian Installation Guide: Setting Up Your System To Use E-Mail

I advice you to go for "mail sent by smarthost" or "mail sent by smarthost; no local mail" if you don't need local mail (if it's only you on the server you probably won't need local mail, but having it enabled won't hurt either) :)

kushalkoolwal 03-26-2009 03:55 AM

Quote:

Originally Posted by omes (Post 3482376)
This might clear up some things: Debian Installation Guide: Setting Up Your System To Use E-Mail

I advice you to go for "mail sent by smarthost" or "mail sent by smarthost; no local mail" if you don't need local mail (if it's only you on the server you probably won't need local mail, but having it enabled won't hurt either) :)

I followed the tutorial and also configured my system as "smarthost; no local mail" but still I am not able to send emails using exim4.

Can anybody post their configuration if they are using exim4 to send emails?

saman007uk 04-05-2009 07:03 PM

Exim shoul dbe able to send e-mails (by using /usr/sbin/sendmail or /us/bin/mail) without any prior configuration.

I suggest that you check the mail logs in /var/log/mail.info


All times are GMT -5. The time now is 08:27 AM.