Sponsored Content
Top Forums Shell Programming and Scripting Sendmail Fails to send emails from Linux server. Post 303003286 by drysdalk on Monday 11th of September 2017 05:17:50 PM
Old 09-11-2017
Hi,

Sorry for the delay in replying - glad you've gotten your Sendmail config generating correctly now at least. I'm afraid I can't really help you much further though, sorry. I've got no experience myself in setting up Sendmail to do what you're trying to do, as I've never had to set up a Sendmail box to do quite what you're trying to do.

From some Googling it seems it's certainly possible to get Sendmail to talk to an MSA rather than an MTA and authenticate against it using the authinfo mechanism previously discussed, but as you say you might need to get TLS and other things besides working for this to operate correctly. Perhaps others who have gone down this road and are reading this thread could advise you on how to proceed, if this is really something you absolutely have to do.

On that subject, though: again, is there a reason you have to do this, and pass the mail on to a server that is normally used for talking to mail clients and whatnot ? Why can't you just straight send this mail to its correct destination from your local server, without a relay or smart host or anything else in the way ? Or alternatively, is there not a mail server on site that already is set up to do e-mail correctly that you can just use as your smart relay, saving yourself all this trouble ?
 

10 More Discussions You Might Find Interesting

1. 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

2. Red Hat

Sendmail fails receiving mail since the IP changed on Redhat Server

Hi, Since i move my Linux Redhat server on another Network with new IP address. WE'RE ABLE TO SEND MAIL OUTSIDE BUT we can not receive any incoming mail. It alway points to the old IP. I updated new IP in /etc/hosts and /etc/sysconfig/network then reboot the system. 10.117.32.20 is an old ip... (3 Replies)
Discussion started by: lamoul
3 Replies

3. UNIX for Dummies Questions & Answers

How do I configure Linux server to be able to send emails internally?

Hi The script: #!/bin/sh #set -x # set admin email so that you can get email ADMIN="myemailaddress" # set alert level ALERT=4 df -HP | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do #echo $output usep=$(echo $output | awk '{ print... (5 Replies)
Discussion started by: wbdevilliers
5 Replies

4. Shell Programming and Scripting

Send email from sendmail on AIX using exchange server as SMTP server

i am new in AIX i am trying to write a script to take a backup for specific files on server to and check error log if backup success send email to administrator , script done except for sending mail , i try to configure sendmail on aix to use our exchange server to send emails but still get error... (0 Replies)
Discussion started by: ahmed_salah
0 Replies

5. 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

6. UNIX for Advanced & Expert Users

mailx Vs sendmail to send internal emails to exchange

Hi Gurus, I have been searching for this around, but sendmail seems complicated and not sure if "mail" command would do, since all what I need to send internal emails from my solaris 10 box to our exchange server. Would the mailx or mail command do ? I tried the : # mailx -s test... (2 Replies)
Discussion started by: aladdin
2 Replies

7. Linux

Sendmail takes too long to start and the host is unable to send emails

Hello All, Sendmail takes too long to start and the host is unable to send emails, below are the steps followed, Please let me know if I'm missing anything, is there a debug mode for mailx? # time service sendmail restart Shutting down sm-client: Shutting... (6 Replies)
Discussion started by: lovesaikrishna
6 Replies

8. UNIX for Dummies Questions & Answers

Emails sent from Linux server are rejected by recipient

Hello i have this longterm issue which im unable to solve, i think this is quite simple issue, i hope you may know the cause It is on CentOS Redhat server with qmail installed. # service qmail status # service qmail start Starting Qmail: # ps aux | grep mail qmails 1688 0.0 0.0 ... (1 Reply)
Discussion started by: postcd
1 Replies

9. AIX

Sendmail daemon is inactive, but still i can send emails

Hi, I did setup sendmail on one of AIX LPARs. Its working as expected. But, would like to clarify something with you all. I stopped the sendmail daemon on AIX LPAR, now it is inactive(&commented it on /etc/rc.tcpip ). But still, am able to send the emails even after stopping daemon. ... (6 Replies)
Discussion started by: system.engineer
6 Replies

10. Shell Programming and Scripting

How to configure mutt to send emails on Linux.?

Hello, I am trying to use mutt in order to send emails. I have installed mutt using yum and pasted some details about it later in the post. When I try to run: echo test | mutt -s "Test Email" user@id.com It doesn't do anything. I dont receive any emails. I have the SMTP details for... (1 Reply)
Discussion started by: vaibhavraj
1 Replies
MIMEDEFANG(8)						      System Manager's Manual						     MIMEDEFANG(8)

NAME
mimedefang - Sendmail MIME mail filter SYNOPSIS
mimedefang prcap mimedefang -p connection -m mx_socket_name -U user [options] DESCRIPTION
mimedefang is a filter built around Sendmail 8.11's milter API for mail filters. It collects each incoming message and runs a filter on the message. This is useful for deleting attachments which may be a security risk on poorly-designed systems like Microsoft Windows. mimedefang does not actually run the Perl filter; instead, it communicates with mimedefang-multiplexor(8), which manages a pool of persis- tent Perl processes. See the mimedefang-multiplexor man page for additional information. OPTIONS
If you invoke mimedefang with the single argument prcap, it prints information about the version of Milter it is linked against and exits. Otherwise, you should invoke mimedefang as shown in the second line of the SYNOPSIS. -U user Runs mimedefang as user rather than root. The user argument must match the argument to mimedefang-multiplexor's -U option as well. -z spooldir Set the spool directory to spooldir. If this option is omitted, the spool directory defaults to /var/spool/MIMEDefang. -p connection The -p switch is required and specifies the milter connection type. Typically, you should run mimedefang on the same computer as sendmail. Therefore, you should use a UNIX-domain socket for the connection type. The suggested value for the -p switch is mimede- fang.sock under the spool directory. -m mx_socket_name Specifies the socket for communicating with mimedefang-multiplexor(8). The mx_socket_name specifies the path of the UNIX-domain socket. See mimedefang-multiplexor(8) for details. -b backlog Sets the "backlog" argument to the listen(2) system call to backlog. If this option is omitted, then the operating-system default backlog is used. -d The -d switch causes mimedefang not to delete the temporary spool files it creates for incoming messages. This is for debugging purposes only and should never be used on a production mail server. -r Causes mimedefang to perform a relay check before processing any messages. It calls into a user-supplied Perl function called fil- ter_relay with the IP address and host name of the sending relay. (See mimedefang-filter(5) for details.) -H Causes mimedefang to perform a HELO check before processing any messages. It calls into a user-supplied Perl function called fil- ter_helo with the IP address and host name of the sending relay, and the HELO argument. (See mimedefang-filter(5) for details.) -s Causes mimedefang to perform a sender check before processing the message body. It calls into a user-supplied Perl function called filter_sender with the envelope address of the sender. (See mimedefang-filter(5) for details.) -t Causes mimedefang to perform recipient checks before processing the message body. It calls into a user-supplied Perl function called filter_recipient with the envelope address of each recipient. (See mimedefang-filter(5) for details.) -q Permits the multiplexor to queue new connections. See the section QUEUEING REQUESTS in the mimedefang-multiplexor man page. Note that this option and the -R option are mutually-exclusive. If you supply -q, then -R is ignored. -k Causes mimedefang not to delete working directories if a filter fails. This lets you obtain the message which caused the filter to fail and determine what went wrong. mimedefang logs the directory containing the failed message using syslog. -P fileName Causes mimedefang to write its process-ID (after becoming a daemon) to the specified file. -R num Normally, mimedefang tempfails a new SMTP connection if there are no free slaves. Supplying the -R num option makes mimedefang tempfail new connections if there are fewer than num free slaves, unless the connection is from the local host. This allows you to favour connections from localhost so your clientmqueue doesn't build up. Note that supplying -R 0 is subtly different from omitting the option; in this case, mimedefang permits new connections from localhost to queue, but not connections from other hosts (unless you also supply the -q option.) The purpose of the -R option is to reserve resources for clientmqueue runs. Otherwise, on a very busy mail server, clientmqueue runs can starve for a long time, leading to delays for locally-generated or streamed mail. We recommend using a small number for num; probably no more than 3 or 10% of the total number of slaves (whichever is smaller.) Note that this option and the -q option are mutually-exclusive. If you supply -q, then -R is ignored. -C Conserve file descriptors by opening and closing disk files more often. (Disk files are never held open across Milter callbacks.) While this shortens the length of time a file descriptor is open, it also leaves more opportunities for the open to fail. We do not recommend the use of this flag except on very busy systems that exhibit failures due to a shortage of file descriptors. -T Causes mimedefang to log the run-time of the Perl filter using syslog. -x string Add string as the content of the X-Scanned-By: header. If you set string to the empty string (i.e. -x ""), then no X-Scanned-By: header will be added. -X Do not add an X-Scanned-By: header. Specifying -X is equivalent to specifying -x "". -D Do not fork into the background and become a daemon. Instead, stay in the foreground. Useful mainly for debugging or if you have a supervisory process managing mimedefang. -M This option is obsolete; it is accepted for backward-compatibility, but is ignored. -N Normally, mimedefang sees all envelope recipients, even ones that Sendmail knows to be invalid. If you don't want Sendmail to per- form a milter callback for recipients it knows to be invalid, invoke mimedefang with the -N flag. Please note that this flag only works with Sendmail and Milter 8.14.0 and newer. It has no effect if you're running an older version of Sendmail or Milter. -S facility Specifies the syslog facility for log messages. The default is mail. See openlog(3) for a list of valid facilities. You can use either the short name ("mail") or long name ("LOG_MAIL") for the facility name. -a macro Pass the value of the specified Sendmail macro through to the Perl filter. You can repeat the -a option to write more macros than the built-in defaults. Note that in addition to asking mimedefang to pass the macro value to the filter, you must configure Send- mail to pass the macro through to mimedefang using the confMILTER_MACROS_ENVFROM definition in Sendmail's m4 configuration file. -c Strip "bare" carriage-returns (CR) characters from the message body. A bare CR should never appear in an e-mail message. Older versions of mimedefang used to strip them out automatically, but now they are left in by default. The -c option enables the older behavior. -h Print usage information and exit. OPERATION
When mimedefang starts, it connects to sendmail using the milter API. (See the Sendmail 8.11 documentation.) For each incoming message, mimedefang creates a temporary directory and saves information in the directory. At various phases during the SMTP conversation, mimede- fang communicates with mimedefang-multiplexor to perform various operations. mimedefang-multiplexor manages a pool of persistent Perl pro- cesses that actually perform the mail scanning operations. When a Perl process scans an e-mail, the temporary spool directory contains certain files; details of the communication protocol between mimedefang and the Perl script are in mimedefang-protocol(7). WARNINGS
mimedefang does violence to the flow of e-mail. The Perl filter is quite picky and assumes that MIME e-mail messages are well-formed. While I have tried to make the script safe, I take no responsibility for lost or mangled e-mail messages or any security holes this script may introduce. AUTHOR
mimedefang was written by David F. Skoll <dfs@roaringpenguin.com>. The mimedefang home page is http://www.mimedefang.org/. SEE ALSO
mimedefang.pl(8), mimedefang-filter(5), mimedefang-multiplexor(8), mimedefang-protocol(7) 4th Berkeley Distribution 8 February 2005 MIMEDEFANG(8)
All times are GMT -4. The time now is 08:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy