Sponsored Content
Operating Systems SCO Sendmail delivers mail to local user if it exists instead of passing it to the smart relay Post 302754395 by MadeInGermany on Thursday 10th of January 2013 01:56:31 PM
Old 01-10-2013
Debugging:
Code:
sendmail -bv fred@thisdomain.com

Code:
sendmail -bt
0 fred@thisdomain.com
^D

You have

DSsmarthost

then also put

DHsmarthost

Restart sendmail to take effect.
Hopefully the vendor did not build the sendmail.cf with Sun's remote mode feature - that will inhibit things like DS.
 

10 More Discussions You Might Find Interesting

1. Programming

Sendmail & mail.local + MySQL API

I've searched this message board, and the newgroups THOROUGHLY, in search of any information towards implenting the MySQL API with C... I'm a "beginner" to the C language I suppose, and i've made a few functions in C that can be implemented into the source code of Sendmail/mail.local, so that any... (2 Replies)
Discussion started by: CGrusden19
2 Replies

2. Cybersecurity

Sendmail Relay

I'm trying to get my Solaris 7 sendmail server to allow external clients to send to external recipients. I know this has to do with relaying, but I'm not sure how unsafe I have to get to allow this. I simply need for users to login from any domain and be allowed to send mail via SMTP to any... (4 Replies)
Discussion started by: Solaris
4 Replies

3. UNIX for Dummies Questions & Answers

Sendmail open relay

All I am having a bit of a problem with my sendmail smtp server. The environment: Redhat Linux 8 sendmail-8.12.8-9.80. The mailserver is used by our application to send mail notifications to users on the system. The application is hosted on 2 different servers (separate domains)... (2 Replies)
Discussion started by: skotapal
2 Replies

4. Linux

local mail relay problem in Sendmail

I have a linux box. Sendmail is work fine in this box. The only problem I am facing is whenever I send mail using the mail command to the outside world or to root@localhost, I get this error - 127.0.0.1 localhost denied from relaying The command I used to send mail is - Ls -l | mail -s... (0 Replies)
Discussion started by: RajaRC
0 Replies

5. Solaris

Sendmail relay problem

I have a sendmail issue When I try to send a mail message using mailx I get a "connection refused by mail14.messagelabs.com" error. relay=mail14.messagelabs.com., dsn=4.0.0, stat=Deferred: Connection refused by mail14.messagelabs.com However, mail14.messagelabs.com doesn't exist. The... (4 Replies)
Discussion started by: soliberus
4 Replies

6. OS X (Apple)

Ho do I masquerade the "user@user.local" address in mail/mailx?

Hi, I'm brand new here and looking for a solution: I'm using mail or mailx. The default reply address is «myshortusername@mylongusername.local» which makes absolutely no sense for anybody receiving my emails. But how do I change it? There seem to be many solutions but none for Mac OS X.... (0 Replies)
Discussion started by: gczychi
0 Replies

7. Solaris

Sendmail error delaying relay

When I try to send mail, sendmail delays a lot. After monitoring syslog, I noticed that sendmail starts with this first message... waits a minute and gives the second message... waits another minute and then sends off the email. How do I correct this in sendmail or completly disable it. I'm sending... (0 Replies)
Discussion started by: adelsin
0 Replies

8. UNIX for Advanced & Expert Users

How to relay mail to mail server from Unix ?

Hi, I need to send email notifications from Unix/Linux box to users using mailx. In these Unix/Linux boxes mail is not configured however we are having mail server configured in our LAN. Could you please provide instructions to configure relay in these boxes so that we can relay our mails... (3 Replies)
Discussion started by: sourabhsharma
3 Replies

9. Red Hat

add relay to sendmail.cf

Hi, I notice that my relay on sendmail.cf is just "DS" and no ip. So I guess, it's using the local DNS to relay my mail which sometimes being spammed. I would like to add a new relay ip "DSxxx.xxx.xxx.xxx" on sendmail.cf. What do I need to edit sendmail.cf? Do I just use vi or m4? ... (4 Replies)
Discussion started by: itik
4 Replies

10. Solaris

Sendmail relay failing

Hi Techies Bit new to sendmail thingy. I have a Solaris 10 box. There is a request generated by customer that they want Solaris 10 box to use as relay an external smtp server. the smtp server is updated in hosts file and it is pingable. I have updated by "vi" /etc/mail/sendmail.cf # ...... (0 Replies)
Discussion started by: khaniqshahid
0 Replies
Sendmail(3pm)						User Contributed Perl Documentation					     Sendmail(3pm)

NAME
Mail::Sendmail - Simple platform independent mailer SYNOPSIS
use Mail::Sendmail; %mail = ( To => 'you@there.com', From => 'me@here.com', Message => "This is a very short message" ); sendmail(%mail) or die $Mail::Sendmail::error; print "OK. Log says: ", $Mail::Sendmail::log; DESCRIPTION
Simple platform independent e-mail from your perl script. Only requires Perl 5 and a network connection. Mail::Sendmail takes a hash with the message to send and sends it to your mail server. It is intended to be very easy to setup and use. See also "FEATURES" below, and as usual, read this documentation. There is also a FAQ (see "NOTES"). INSTALLATION
Best "perl -MCPAN -e "install Mail::Sendmail"" Traditional perl Makefile.PL make make test make install Manual Copy Sendmail.pm to Mail/ in your Perl lib directory. (eg. c:PerlsitelibMail or /usr/lib/perl5/site_perl/Mail/ or whatever it is on your system. They are listed when you type C< perl -V >) ActivePerl's PPM Depending on your PPM version: ppm install --location=http://alma.ch/perl/ppm Mail-Sendmail or ppm install http://alma.ch/perl/ppm/Mail-Sendmail.ppd But this way you don't get a chance to have a look at other files (Changes, Todo, test.pl, ...). At the top of Sendmail.pm, set your default SMTP server(s), unless you specify it with each message, or want to use the default (localhost). Install MIME::QuotedPrint. This is not required but strongly recommended. FEATURES
Automatic time zone detection, Date: header, MIME quoted-printable encoding (if MIME::QuotedPrint installed), all of which can be overridden. Bcc: and Cc: support. Allows real names in From:, To: and Cc: fields Doesn't send an X-Mailer: header (unless you do), and allows you to send any header(s) you want. Configurable retries and use of alternate servers if your mail server is down Good plain text error reporting Experimental support for SMTP AUTHentication LIMITATIONS
Headers are not encoded, even if they have accented characters. Since the whole message is in memory, it's not suitable for sending very big attached files. The SMTP server has to be set manually in Sendmail.pm or in your script, unless you have a mail server on localhost. Doesn't work on OpenVMS, I was told. Cannot test this myself. CONFIGURATION
Default SMTP server(s) This is probably all you want to configure. It is usually done through $mailcfg{smtp}, which you can edit at the top of the Sendmail.pm file. This is a reference to a list of SMTP servers. You can also set it from your script: "unshift @{$Mail::Sendmail::mailcfg{'smtp'}} , 'my.mail.server';" Alternatively, you can specify the server in the %mail hash you send from your script, which will do the same thing: "$mail{smtp} = 'my.mail.server';" A future version will (hopefully) try to set useful defaults for you during the Makefile.PL. Other configuration settings See %mailcfg under "DETAILS" below for other configuration options. DETAILS
sendmail() sendmail is the only thing exported to your namespace by default "sendmail(%mail) || print "Error sending mail: $Mail::Sendmail::error ";" It takes a hash containing the full message, with keys for all headers and the body, as well as for some specific options. It returns 1 on success or 0 on error, and rewrites $Mail::Sendmail::error and $Mail::Sendmail::log. Keys are NOT case-sensitive. The colon after headers is not necessary. The Body part key can be called 'Body', 'Message' or 'Text'. The SMTP server key can be called 'Smtp' or 'Server'. If the connection to this one fails, the other ones in $mailcfg{smtp} will still be tried. The following headers are added unless you specify them yourself: Mime-Version: 1.0 Content-Type: 'text/plain; charset="iso-8859-1"' Content-Transfer-Encoding: quoted-printable or (if MIME::QuotedPrint not installed) Content-Transfer-Encoding: 8bit Date: [string returned by time_to_date()] If you wish to use an envelope sender address different than the From: address, set $mail{Sender} in your %mail hash. The following are not exported by default, but you can still access them with their full name, or request their export on the use line like in: "use Mail::Sendmail qw(sendmail $address_rx time_to_date);" embedding options in your %mail hash The following options can be set in your %mail hash. The corresponding keys will be removed before sending the mail. $mail{smtp} or $mail{server} The SMTP server to try first. It will be added $mail{port} This option will be removed. To use a non-standard port, set it in your server name: $mail{server}='my.smtp.server:2525' will try to connect to port 2525 on server my.smtp.server $mail{auth} This must be a reference to a hash containg all your authentication options: $mail{auth} = \%options; or $mail{auth} = {user=>"username", password=>"password", method=>"DIGEST-MD5", required=>0 }; user username pass or password password method optional method. compared (stripped down) to available methods. If empty, will try all available. required optional. defaults to false. If set to true, no delivery will be attempted if authentication fails. If false or undefined, and authentication fails or is not available, sending is tried without. (different auth for different servers?) Mail::Sendmail::time_to_date() convert time ( as from "time()" ) to an RFC 822 compliant string for the Date header. See also "%Mail::Sendmail::mailcfg". $Mail::Sendmail::error When you don't run with the -w flag, the module sends no errors to STDERR, but puts anything it has to complain about in here. You should probably always check if it says something. $Mail::Sendmail::log A summary that you could write to a log file after each send $Mail::Sendmail::address_rx A handy regex to recognize e-mail addresses. A correct regex for valid e-mail addresses was written by one of the judges in the obfuscated Perl contest... :-) It is quite big. This one is an attempt to a reasonable compromise, and should accept all real-world internet style addresses. The domain part is required and comments or characters that would need to be quoted are not supported. Example: $rx = $Mail::Sendmail::address_rx; if (/$rx/) { $address=$1; $user=$2; $domain=$3; } %Mail::Sendmail::mailcfg This hash contains installation-wide configuration options. You normally edit it once (if ever) in Sendmail.pm and forget about it, but you could also access it from your scripts. For readability, I'll assume you have imported it (with something like "use Mail::Sendmail qw(sendmail %mailcfg)"). The keys are not case-sensitive: they are all converted to lowercase before use. Writing "$mailcfg{Port} = 2525;" is OK: the default $mailcfg{port} (25) will be deleted and replaced with your new value of 2525. $mailcfg{smtp} "$mailcfg{smtp} = [qw(localhost my.other.mail.server)];" This is a reference to a list of smtp servers, so if your main server is down, the module tries the next one. If one of your servers uses a special port, add it to the server name with a colon in front, to override the default port (like in my.special.server:2525). Default: localhost. $mailcfg{from} "$mailcfg{from} = 'Mailing script me@mydomain.com';" From address used if you don't supply one in your script. Should not be of type 'user@localhost' since that may not be valid on the recipient's host. Default: undefined. $mailcfg{mime} "$mailcfg{mime} = 1;" Set this to 0 if you don't want any automatic MIME encoding. You normally don't need this, the module should 'Do the right thing' anyway. Default: 1; $mailcfg{retries} "$mailcfg{retries} = 1;" How many times should the connection to the same SMTP server be retried in case of a failure. Default: 1; $mailcfg{delay} "$mailcfg{delay} = 1;" Number of seconds to wait between retries. This delay also happens before trying the next server in the list, if the retries for the current server have been exhausted. For CGI scripts, you want few retries and short delays to return with a results page before the http connection times out. For unattended scripts, you may want to use many retries and long delays to have a good chance of your mail being sent even with temporary failures on your network. Default: 1 (second); $mailcfg{tz} "$mailcfg{tz} = '+0800';" Normally, your time zone is set automatically, from the difference between "time()" and "gmtime()". This allows you to override automatic detection in cases where your system is confused (such as some Win32 systems in zones which do not use daylight savings time: see Microsoft KB article Q148681) Default: undefined (automatic detection at run-time). $mailcfg{port} "$mailcfg{port} = 25;" Port used when none is specified in the server name. Default: 25. $mailcfg{debug} "$mailcfg{debug} = 0;" Prints stuff to STDERR. Current maximum is 6, which prints the whole SMTP session, except data exceeding 500 bytes. Default: 0; $Mail::Sendmail::VERSION The package version number (you can not import this one) Configuration variables from previous versions The following global variables were used in version 0.74 for configuration. As from version 0.78_1, they are not supported anymore. Use the %mailcfg hash if you need to access the configuration from your scripts. $Mail::Sendmail::default_smtp_server $Mail::Sendmail::default_smtp_port $Mail::Sendmail::default_sender $Mail::Sendmail::TZ $Mail::Sendmail::connect_retries $Mail::Sendmail::retry_delay $Mail::Sendmail::use_MIME ANOTHER EXAMPLE
use Mail::Sendmail; print "Testing Mail::Sendmail version $Mail::Sendmail::VERSION "; print "Default server: $Mail::Sendmail::mailcfg{smtp}->[0] "; print "Default sender: $Mail::Sendmail::mailcfg{from} "; %mail = ( #To => 'No to field this time, only Bcc and Cc', #From => 'not needed, use default', Bcc => 'Someone <him@there.com>, Someone else her@there.com', # only addresses are extracted from Bcc, real names disregarded Cc => 'Yet someone else <xz@whatever.com>', # Cc will appear in the header. (Bcc will not) Subject => 'Test message', 'X-Mailer' => "Mail::Sendmail version $Mail::Sendmail::VERSION", ); $mail{Smtp} = 'special_server.for-this-message-only.domain.com'; $mail{'X-custom'} = 'My custom additionnal header'; $mail{'mESSaGE : '} = "The message key looks terrible, but works."; # cheat on the date: $mail{Date} = Mail::Sendmail::time_to_date( time() - 86400 ); if (sendmail %mail) { print "Mail sent OK. " } else { print "Error sending mail: $Mail::Sendmail::error " } print " $Mail::Sendmail::log says: ", $Mail::Sendmail::log; Also see http://alma.ch/perl/Mail-Sendmail-FAQ.html for examples of HTML mail and sending attachments. CHANGES
Main changes since version 0.79: Experimental SMTP AUTH support (LOGIN PLAIN CRAM-MD5 DIGEST-MD5) Fix bug where one refused RCPT TO: would abort everything send EHLO, and parse response Better handling of multi-line responses, and better error-messages Non-conforming line-endings also normalized in headers Now keeps the Sender header if it was used. Previous versions only used it for the MAIL FROM: command and deleted it. See the Changes file for the full history. If you don't have it because you installed through PPM, you can also find the latest one on http://alma.ch/perl/scripts/Sendmail/Changes. On Debian systems Sys::Hostname::Long is tried before Sys::Hostname in order get a fully qualified domain name. AUTHOR
Milivoj Ivkovic <mix40alma.ch> ("x40" is "@" of course) NOTES
MIME::QuotedPrint is used by default on every message if available. It allows reliable sending of accented characters, and also takes care of too long lines (which can happen in HTML mails). It is available in the MIME-Base64 package at http://www.perl.com/CPAN/modules/by-module/MIME/ or through PPM. Look at http://alma.ch/perl/Mail-Sendmail-FAQ.html for additional info (CGI, examples of sending attachments, HTML mail etc...) You can use this module freely. (Someone complained this is too vague. So, more precisely: do whatever you want with it, but be warned that terrible things will happen to you if you use it badly, like for sending spam, or ...?) Thanks to the many users who sent me feedback, bug reports, suggestions, etc. And please excuse me if I forgot to answer your mail. I am not always reliabe in answering mail. I intend to set up a mailing list soon. Last revision: 06.02.2003. Latest version should be available on CPAN: http://www.cpan.org/modules/by-authors/id/M/MI/MIVKOVIC/. perl v5.10.0 2008-11-05 Sendmail(3pm)
All times are GMT -4. The time now is 02:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy