LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-19-2009, 02:37 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
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.

Last edited by kushalkoolwal; 03-19-2009 at 02:40 PM.
 
Old 03-20-2009, 01:48 PM   #2
omes
Member
 
Registered: Jan 2003
Distribution: debian, FreeBSD
Posts: 120

Rep: Reputation: 15
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)

Last edited by omes; 03-20-2009 at 01:53 PM.
 
Old 03-26-2009, 03:55 AM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by omes View Post
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?
 
Old 04-05-2009, 07:03 PM   #4
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364

Rep: Reputation: 33
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Do I really need exim4 if I only use webmail? BigVig Linux - Newbie 2 10-02-2008 06:41 PM
Exim4 Redirect Luke_C Linux - Server 1 08-11-2006 07:00 PM
Exim4 did work, but now it doesn't bd1308 Linux - Software 0 09-09-2005 02:07 PM
exim4 help mithereal Linux - General 3 08-29-2005 03:49 PM
exim4 exim4, setup debian tongueroo Linux - Networking 1 11-09-2004 04:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration