Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-07-2011, 11:42 AM
|
#1
|
Member
Registered: Dec 2003
Posts: 78
Rep:
|
Sendmail piping from a text file
Hello,
I'm trying to pipe from a textfile to sendmail.
The command I'm using on teh sendmail server is:
[root@sendmail-server test]# sendmail to-email-address@relay_server-address < test2.txt
test2.txt is:
Date: 1/6/2011
To: to-email-address@relay_server-address
Subject: ** PROBLEM alert - vvmite02/Florida Handset 02 is CRITICAL **
From: from-email-address@sendmail-server
This is a test three
.
I'm doing this because I was doing this from an aliases file just fine until about three weeks ago. The aliases file suddenly stopped working after the relay server received an inordinate amount of email from the From: address and for the To: address.
I suppose I need a sendmail guru?
Thanks in advance for your time and assistance.
Blaine
|
|
|
01-07-2011, 01:52 PM
|
#2
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
Hang on... Didnt see that part of the post. Let me get back to you here in a second.
Got it. So you want to use an input file, not manual input.
The text file would be:
Then do a
Quote:
sendmail -vt < text.txt
or
sendmail -vt -G relay.server.com < text.txt
|
Last edited by szboardstretcher; 01-07-2011 at 02:11 PM.
|
|
|
01-07-2011, 03:36 PM
|
#3
|
Member
Registered: Dec 2003
Posts: 78
Original Poster
Rep:
|
szboardstretcher,
Tried as you suggested. Thanks for the excellent tip. The email is still not getting through. Could it be that the from-email-name.somewhere.com is getting filtered somehow?
I must admit, I'm a bit confused by sendmail and its workings.
Just a pup, as it were...
Thanks for your time and consideration.
Blaine
|
|
|
01-07-2011, 04:10 PM
|
#4
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,223
|
You can use the -f option to specify the sender:
Code:
sendmail -f sender@domain.com -t < test2.txt
|
|
|
01-07-2011, 04:22 PM
|
#5
|
Member
Registered: Dec 2003
Posts: 78
Original Poster
Rep:
|
bathory,
Good suggestion. Tried it with the same null results. sendmail doesn't error, but I don't get the message either.
I'm leaning more and more towards some sort of filtering on the relay server. All the other emails from this domain are passed.
Thanks very much for your continued time and patience.
Blaine
|
|
|
01-07-2011, 04:32 PM
|
#6
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,223
|
Take a look at /var/log/maillog to see if the message was accepted by the relay.
Maybe it's finished in recipient's trash or spam folder.
|
|
|
01-07-2011, 04:40 PM
|
#7
|
Member
Registered: Dec 2003
Posts: 78
Original Poster
Rep:
|
bathory,
Good idea. I'll call the owners of the relay server and ask them if they're filtering me. I've checked my logs and the stat=Sent for all the messages to the relay server from my sendmail server.
This sure does get complicated. At least to me.
Thanks again for your patience and consideration.
Blaine
|
|
|
01-08-2011, 08:25 AM
|
#8
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
Quote:
Originally Posted by blainemiller
bathory,
Good idea. I'll call the owners of the relay server and ask them if they're filtering me. I've checked my logs and the stat=Sent for all the messages to the relay server from my sendmail server.
This sure does get complicated. At least to me.
Thanks again for your patience and consideration.
Blaine
|
Sounds like the mail is leaving your server. With the -v option on the sendmail command, do you see that the sender and receiver are correct? If so, it is probably your relay filtering your mail, which may not give you an error, it may instead take the message, report that it has taken the message, then silently drop it.
|
|
|
All times are GMT -5. The time now is 11:03 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|