LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-01-2004, 09:43 PM   #1
hpnadig
Member
 
Registered: Nov 2003
Location: India
Distribution: Fedora
Posts: 43

Rep: Reputation: 15
Unhappy how do I send and recieve mails locally?


on linux, If I should send mails locally, what should I do?

also, how to recieve that?

e.g. If I mail to rrot@localhost, how should I be sending it and also recieveing it?

plz help!
 
Old 01-01-2004, 09:55 PM   #2
vinay_s_s
Member
 
Registered: Jul 2003
Posts: 659

Rep: Reputation: 30
do this as user to mail to root,
mail root
then type subject, then hit enter, then type message (body) then hit "ctrl+d"
then it asks for CCs (carbon copies) give if any, then hit enter.

now to see mail as root, login as root.
Type mail, u can see the new message.
 
Old 01-01-2004, 10:23 PM   #3
mac_phil
Member
 
Registered: Sep 2003
Distribution: Mandrake 10.0
Posts: 200

Rep: Reputation: 30
You need a mail transfer agent running. I recommend Postfix.
 
Old 01-02-2004, 04:06 AM   #4
hpnadig
Member
 
Registered: Nov 2003
Location: India
Distribution: Fedora
Posts: 43

Original Poster
Rep: Reputation: 15
woa! I'm real sorry for not giving out actual details...

I'm actually testing my script that sends mail through sendmail...

But smehow, when I send with local address, (localhost i.e) It hangs..

also, how do I set up a POP server locally?
 
Old 01-03-2004, 01:37 AM   #5
vinay_s_s
Member
 
Registered: Jul 2003
Posts: 659

Rep: Reputation: 30
Use postfix. (IMO, Sendmail sucks!!)
 
Old 01-03-2004, 08:27 AM   #6
hpnadig
Member
 
Registered: Nov 2003
Location: India
Distribution: Fedora
Posts: 43

Original Poster
Rep: Reputation: 15
well, lets not go about which one sucks... The problem actually is how to send mails locally ( say to localhost ) okay, say postfix or sendmail... what name should I use to send mails to the local machine?
e.g If user name is hp, should I use hp@localhost?

also, how do I retrieve the mails sent like that?

all the mails I tried sending ended up in the sendmail Queue qith an error as "DNS not resolved"
 
Old 01-03-2004, 01:24 PM   #7
vinay_s_s
Member
 
Registered: Jul 2003
Posts: 659

Rep: Reputation: 30
Sorry. I didnt mean to flame a war.

just do
mail <address>

where address is root@localhost or user@localhost
 
Old 01-03-2004, 09:26 PM   #8
hpnadig
Member
 
Registered: Nov 2003
Location: India
Distribution: Fedora
Posts: 43

Original Poster
Rep: Reputation: 15
well, I've done that...

the mail just ends up in the sendmail Queue (sendmail -bp)...

with an error "can't resolve the name"

I don't know how to take it from here....

I just gotto get some mails landed in the /var/spool/mail

just to get on with the testing of my applet..
 
Old 01-03-2004, 11:54 PM   #9
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Sounds like you don't have the localhost pointing to 127.0.0.1 anymore. I'm not sure about Mandrake but in Redhat if you check /etc/sysconfig/network you should see something like this...
NETWORKING=YES
HOSTNAME=localhost.localdomain

Also, it wouldn't hurt to check the /etc/hosts for something like this. The second part may be different on your machine.

127.0.0.1 localhost.localdomain localhost
192.168.0.1 computer1.workgroup computer1
 
Old 01-04-2004, 02:58 AM   #10
hpnadig
Member
 
Registered: Nov 2003
Location: India
Distribution: Fedora
Posts: 43

Original Poster
Rep: Reputation: 15
well, I did that...

but still I'm getting this...

check this out...

Code:
[root@localhost root]# mail root
Subject: dfsdf  fds fsdf  ds fds
Cc: Null message body; hope that's ok
[root@localhost root]# mail
No mail for root
[root@localhost root]# sendmail -bp
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
60BBE8FDF3*     297 Sun Jan  4 12:21:11  root@localhost.localhost
                                         hp@localhost.localhost
 
7AE048FDF1*     304 Sun Jan  4 12:10:53  root@localhost.localhost
                                         root@localhost.localhost
 
32DD18FDCF*    1970 Sun Jan  4 13:01:03  MAILER-DAEMON
                                         root@localhost.localhost
 
BB5A88FDCE*     299 Sun Jan  4 14:29:49  root@localhost.localhost
                                         root@localhost.localhost
 
B733E8FDD0*     305 Sun Jan  4 14:30:31  root@localhost.localhost
                                         root@localhost.localhost
 
E99F18FDF2*     344 Sun Jan  4 12:20:51  hp@localhost.localhost
                                         fddsdfdffdsfs@localhost.localhost
                                         hp@localhost.localhost
 
E9C128FDDD*    1970 Sun Jan  4 12:55:14  MAILER-DAEMON
                                         root@localhost.localhost
 
-- 6 Kbytes in 7 Requests.

Last edited by hpnadig; 01-04-2004 at 03:00 AM.
 
Old 01-04-2004, 05:23 AM   #11
hpnadig
Member
 
Registered: Nov 2003
Location: India
Distribution: Fedora
Posts: 43

Original Poster
Rep: Reputation: 15
taken from my log:

/var/logs/mail/errors :

Code:
Jan  4 16:54:46 localhost postfix/local[3044]: fatal: open database /var/lib/mailman/data/aliases.db: No such file or directory
Jan  4 16:55:47 localhost postfix/local[3051]: fatal: open database /var/lib/mailman/data/aliases.db: No such file or directory
Jan  4 16:56:48 localhost postfix/local[3053]: fatal: open database /var/lib/mailman/data/aliases.db: No such file or directory
/var/logs/mail/info

[CODE]
Jan 4 16:37:25 localhost postfix/postfix-script: starting the Postfix mail system
Jan 4 16:37:25 localhost postfix/master[1845]: daemon started -- version 2.0.13
Jan 4 16:37:26 localhost postfix/nqmgr[1864]: 60BBE8FDF3: from=<root@localhost.localhost>, size=297, nrcpt=1 (queue active)
Jan 4 16:37:26 localhost postfix/nqmgr[1864]: 4283D8FDD9: from=<root@localhost.localhost>, size=339, nrcpt=1 (queue active)
Jan 4 16:37:26 localhost postfix/nqmgr[1864]: 7AE048FDF1: from=<root@localhost.localhost>, size=304, nrcpt=1 (queue active)
Jan 4 16:37:26 localhost postfix/nqmgr[1864]: 32DD18FDCF: from=<>, size=1970, nrcpt=1 (queue active)
Jan 4 16:37:26 localhost postfix/nqmgr[1864]: 9E1D28FDD1: from=<root@localhost.localhost>, size=310, nrcpt=1 (queue active)
Jan 4 16:37:26 localhost postfix/nqmgr[1864]: BB5A88FDCE: from=<root@localhost.localhost>, size=299, nrcpt=1 (queue active)
Jan 4 16:37:26 localhost postfix/nqmgr[1864]: B733E8FDD0: from=<root@localhost.localhost>, size=305, nrcpt=1 (queue active)
Jan 4 16:37:26 localhost postfix/nqmgr[1864]: AC48E8FDD8: from=<>, size=1970, nrcpt=1 (queue active)
Jan 4 16:37:26 localhost postfix/nqmgr[1864]: E99F18FDF2: from=<hp@localhost.localhost>, size=344, nrcpt=2 (queue active)
Jan 4 16:37:26 localhost postfix/nqmgr[1864]: E9C128FDDD: from=<>, size=1970, nrcpt=1 (queue active)
Jan 4 16:37:27 localhost postfix/smtp[1913]: 4283D8FDD9: to=<localhost@localdomain.localhost>, relay=none, delay=2185, status=deferred (Name service error for name=localdomain.localhost type=MX: Host not found, try again)
Jan 4 16:51:51 localhost postfix/nqmgr[1864]: 4283D8FDD9: from=<root@localhost.localhost>, size=339, nrcpt=1 (queue active)
Jan 4 16:51:52 localhost postfix/smtp[3027]: 4283D8FDD9: to=<localhost@localdomain.localhost>, relay=none, delay=3051, status=bounced (Name service error for name=localdomain.localhost type=A: Host not found)
Jan 4 16:51:52 localhost postfix/cleanup[3029]: DE6088FDDA: message-id=<20040104215152.DE6088FDDA@localhost>
Jan 4 16:51:52 localhost postfix/nqmgr[1864]: DE6088FDDA: from=<>, size=1970, nrcpt=1 (queue active)
[/CODE}

/var/log/mail/warnings:

Code:
Jan  4 16:56:49 localhost postfix/master[1845]: warning: /usr/lib/postfix/local: bad command startup -- throttling
Jan  4 16:57:50 localhost postfix/master[1845]: warning: process /usr/lib/postfix/local pid 3055 exit status 1
Jan  4 16:57:50 localhost postfix/master[1845]: warning: /usr/lib/postfix/local: bad command startup -- throttling
Jan  4 16:58:51 localhost postfix/master[1845]: warning: process /usr/lib/postfix/local pid 3056 exit status 1
Jan  4 16:58:51 localhost postfix/master[1845]: warning: /usr/lib/postfix/local: bad command startup -- throttling
Somebody plz help me!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Can send but not recieve namit Linux - Software 7 11-16-2005 05:28 PM
iptables - clients can't send/recieve mails varun_saa Mandriva 4 05-09-2005 05:42 AM
Problem to recieve mails sanjibgupta Linux - General 1 02-23-2005 04:06 AM
Can't recieve emails but can send them mosherben Linux - Software 12 08-10-2004 11:22 AM
recieve and send IP packets! Farhang Linux - Networking 1 07-25-2004 02:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:20 AM.

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