Sendmail Script don't deliver mails


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Sendmail Script don't deliver mails
# 1  
Old 11-02-2011
Sendmail Script don't deliver mails

Hi,

i've got a problem with a sendmail script, which sends HTML mails. Some mail will rejected by the mail server, because the fqdn doesn't exist.

Where can i set the sender-domainname by sendmail?

Quote:
MTA=/usr/lib/sendmail
VERSION=1.0

{
echo "From: $4"
echo "To: $3"
echo "Subject: $2"
echo "X-Mailer: htmlmail" $VERSION
echo "Mime-Version: 1.0"
echo "Content-Type: text/html; charset=US-ASCII"
echo
echo "$1"

} | eval $MTA "$3"


exit 0
My mail server say: "Sender address rejected: Domain not found;", which is correct because of the wrong sender domain.

Thanks
Sven
# 2  
Old 11-02-2011
What output you get with :
Code:
/usr/sbin/sendmail -d0 -bt </dev/null

?
# 3  
Old 11-02-2011
You can set the sender address by "-f". That is:

Code:
eval $MTA -f "$4" "$3"

# 4  
Old 11-03-2011
Hey,

the "-f" parameter made the different.

Thank you very much!!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris - Sendmail - Adding .com.gr in external senders e-mails

Hello Everybody ! I'm Harry from Athens Greece and i have a problem with my Sendmail 8.13.3 installed on Solaris SunOS ultra 5.10. The problem is that when someone sends to us an e-mail and his e-mail address is like : xxxx@xxxx.com, our e-mail server adds up in the senders address a .com.gr... (2 Replies)
Discussion started by: Mcasim
2 Replies

2. UNIX for Advanced & Expert Users

Some mails not scanned by SpamAssassin 3.4.1 w sendmail/procmail on Fedora 21

We have a user who has about a 50% missed rate on spam detection. I'm wondering if his user prefs or something is preventing scanning of all messages? SpamAssassin version 3.4.1, running on Perl version 5.20.3, sendmail Version 8.15.2 The contents of the user_prefs file: # How many points... (2 Replies)
Discussion started by: RobbieTheK
2 Replies

3. Shell Programming and Scripting

How to deliver an error message from script?

Hi I have a script that pick up a file on another server, and place it on a solaris server, but I came across the following error: mget HLR01_21092014? 200 Port command successful 150 Opening data channel for file transfer. HLR01_21092014: No space left on device 426 Connection closed;... (18 Replies)
Discussion started by: fretagi
18 Replies

4. Shell Programming and Scripting

Help with consolidating mails sent by executing script

I have a script which checks for swap usage of the unix server. A cron job has been created to execute this script every hour and send the output via mail. This output is only required for a particular duration and it can range anywhere from 6 hours to 10 hours. So we are commenting out the... (1 Reply)
Discussion started by: kiran1112
1 Replies

5. Solaris

Sendmail delaying mails for 45 mins

Hi, I'm trying to send out mails from my server using mailx, however everytime I send one, it appears to be held in the /var/spool/mqueue for 44 mins before being sent. I'm quite new to sendmail, so don't really know where to start with this /var/log/syslog displays the following: Dec 16... (4 Replies)
Discussion started by: badoshi
4 Replies

6. Shell Programming and Scripting

Mails from shell script

Hello Gurus, I am facing some issues while doing the automation of some progs. The requirement is if any prog fails with error automatically the script will send alert for such failed progs. Below is the table structure:- PROG_NAME Description... (1 Reply)
Discussion started by: pokhraj_d
1 Replies

7. UNIX for Dummies Questions & Answers

Can't configure sendmail to send mails to external SMTP Server

Hi all,I know, that this is very common issue, but I can't find where is the problem... I have Solaris 10 installed.I want to send mail to external SMTP server, like:echo "letter body"| mailx -s "subject" test@test.comBut I donno what kind of changes I have to do in /etc/hosts and sendmail.cf or... (5 Replies)
Discussion started by: nypreH
5 Replies

8. UNIX for Dummies Questions & Answers

Steps to configure sendmail to receive e-mails

Hi Unix Gurus, Please help me out here. Please tell me the steps to conigure sendmail to receive emails (same way we configure outlook client in windows)? Thanks in advance. -Dejavu (1 Reply)
Discussion started by: DejaVu
1 Replies

9. UNIX for Dummies Questions & Answers

Script to delete mails from maildir

Hi buddies, Anybody has any script to delete mails from Maildir/cur??? I mean is it possible to delete mails from Maildir/cur matching a particular subject like spam or fax??? Thanks in advance (1 Reply)
Discussion started by: squid04
1 Replies

10. Solaris

how to send mails to users on exchange server from sendmail/solaris(mailx)

Hi, Can anyone pls. tell me how to access Active directory from solaris. I am looking at solution by which I can send mail notification from the logs generated by scripts, to the users on Exchange server. I am trying for a Perl-LDAP module , but don't realy know how to go for it (5 Replies)
Discussion started by: ganeshh
5 Replies
Login or Register to Ask a Question