Can mailx use a specified interface?


 
Thread Tools Search this Thread
Operating Systems Solaris Can mailx use a specified interface?
# 1  
Old 12-13-2006
Can mailx use a specified interface?

Hello:

I am trying to send unix mail, from command line, to an external e-mail address. When I do a mailx -s 'Subject' me@me.com, it appears to send fine. However, I never receive the e-mail. I contacted network security to see if maybe a firewall somewhere was blocking the e-mail, but so far have had no luck.

Is there a way to tell mailx to use a specific interface? Say, for example, qe0 instead of le0? I did a man mailx, but have had no luck.

A similar example would be traceroute -i qe0 123.123.123.234...I was wondering if you could do something similar with mailx.

Thanks.

-cd
# 2  
Old 12-14-2006
Sounds more like a configuration issue with sendmail.
You probably need to specify a relay in sendmail. Ask your mail admnistrator what mail server you can use as a relay, put it sendmail.cf (look for Smart Relay in sendmail.cf) and restart sendmail.

Now, this may or may not work, depending on how you first configured sendmail, but it's a start.
You may want to check if you have not gotten any mail in your mailbox, or check your mail logs. If your e-mail is being rejected, you should get some feedback.
# 3  
Old 12-14-2006
check your /etc/hosts file for the mailhost entry

make sure from your box you are able to ping to the mailhost
# 4  
Old 12-14-2006
or use the telnet port 25 command to test.

on the problem server try to telnet mailhost 25

like so

root@webby # telnet mailhost 25
Trying 172.42.203.252...
Connected to aquarius.
Escape character is '^]'.
220 aquarius.mydomain.com ESMTP Sendmail 8.8.8+Sun/8.8.8; Fri, 15 Dec 2006 11:10
:28

mail from: sparcguy@mydomain.com <<------------------------ you type anything@anything.com is fine
250 sparcguy@mydomain.com... Sender ok
rcpt to: sparcguy@mydomain.com <<<------------------------ you must type a real email address
250 sparcguy@mydomain.com... Recipient ok
data <<< --------------------------------------------------- you type this
354 Enter mail, end with "." on a line by itself
test test <<< --------------------------------------------------------- you type these
. <<< -------------------------------------------------------- you type this
250 LAA29397 Message accepted for delivery
quit <<< -------------------------------------------------- you type this
221 aquarius.mydomain.com closing connection
Connection closed by foreign host.
root@webby #
250 LAA29397 Message accepted for delivery

if you cannot see this part

Connected to aquarius.
Escape character is '^]'.
220 aquarius.mydomain.com ESMTP Sendmail 8.8.8+Sun/8.8.8; Fri, 15 Dec 2006 11:10
:28


or you see dark blank screen, means either network routing problem, if you get immediate "connect close" after issuing telnet mailhost 25 it probably means remote mailhost smtp port 25 is blocked by maybe a firewall in between, or smtp services like sendmail on remote server not started.

Last edited by sparcguy; 12-14-2006 at 11:29 PM..
# 5  
Old 12-19-2006
I followed your example to the tee, and everything looked totally normal. In fact, the e-mail actually arrived at the destination. Why, then, can I not just simply do a mailx from the unix box??
# 6  
Old 12-19-2006
Can I change some sort of config file to tell smtp to use port 25, as opposed to whatever port it is currently using??

If not, is rmail an option? Could I tell rmail to use port 25??

Last edited by cdunavent; 12-19-2006 at 03:12 PM..
# 7  
Old 12-20-2006
might be some routing problems.

do this command on the server having the problem.

banner test > /tmp/xx

/usr/lib/sendmail -v sparcguy@mydomain.com < /tmp/xx

cut and paste the entire output here
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Adding a network interface to a bonded interface

I have a RHEL 5 system with a bonded interface configure using only one network port (eth0). So I have config file for ifcfg-bond0 and ifcfg-eth. I'd like to configure eth5 to be the second SLAVE in the bond. My question is, after I modify ifcfg-eth5, can I add eth5 to the bond0 interface without... (1 Reply)
Discussion started by: westmoreland
1 Replies

2. UNIX for Dummies Questions & Answers

Interface

Hi All, How to check whether a Interface has a single port or dual port.Thanks in advance. (5 Replies)
Discussion started by: rama krishna
5 Replies

3. IP Networking

Need a bridge from an ethernet interface to a serial interface

This is my situation DOS pc serial cable (sl0) Linux Pc eth1 192.168.0.10 <-------------------->192.168.0.2 <------------>192.168.0.1 (router) I connected the linux pc and the dos pc with a SLIP (serial line internet protocol), so they can communicate in the sl0 interface. ... (3 Replies)
Discussion started by: mghis
3 Replies

4. SCO

Change SCO - GUI or Desktop interface to DOS based interface

Hi all I have installed a demo version of SCO OpenServer 5.0.2, I finally found it is Desktop Interface, I would like to know how to change its interface to dos based interface? If you have any ideas, please tell me then. Thank you (2 Replies)
Discussion started by: TinhNhi
2 Replies

5. Solaris

Command line Interface or GUI Interface not shown on solaris

Dear all, I am a newbie in solaris and I need your advice. I have a Solaris version 5.9 installed on Sunfire V240. I am able to ssh the machine from putty remotely. My problem is that I cannot see the display from KVM switch I have connected to it. I need also to be able to see the GUI... (2 Replies)
Discussion started by: mbouster
2 Replies

6. Shell Programming and Scripting

Mailx: How to send a attachment using mailx command

Hi All, Can anyone please provide the command for sending an mail with attachment using mailx command. Thanks in Advance :) Regards, Siram. (3 Replies)
Discussion started by: Sriram.Vedula53
3 Replies

7. IP Networking

How to down interface without name

Hi, ifconfig -a return: eth0 Link encap:Ethernet HWaddr 00:09:3D:12:9D:5A inet addr:172.19.208.7 Bcast:172.19.208.63 Mask:255.255.255.192 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:211478649 errors:0 dropped:0 overruns:0 frame:0 ... (5 Replies)
Discussion started by: djbuly
5 Replies

8. Solaris

no such interface

Hi Community, I've a problem with an interface of my Sun Workstation: when I try to plumb hme0 interface I see this output: # ifconfig hme0 <ip_address> netmask <mask> plumb #ifconfig: plumb: hme0: no such interface I've the same thing with dhcp service. could you provide any solution... (1 Reply)
Discussion started by: Sunb3
1 Replies

9. UNIX for Dummies Questions & Answers

mailx error message : mailx: NUL changed to @

If I use the "Mail" link instead of the "mail" link to ../mailx I get this error. Mail so-n-so @whatever.com mailx: NUL changed to @ Unknown command: "postmaster" The email still goes through but i get the error. If I use "mail" it goes thru without the error. Any ideas?? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies
Login or Register to Ask a Question