Sponsored Content
Full Discussion: /etc/aliases & Sendmail
Operating Systems Linux Red Hat /etc/aliases & Sendmail Post 302890184 by verdepollo on Tuesday 25th of February 2014 03:01:30 PM
Old 02-25-2014
Have you set your $PATH within the script?

Does the script work if you run it by hand?

Also, for simplicity you can substitute 2> /dev/null > /dev/null with &> /dev/null.

I'm wondering though, if the script runs as a different user, why don't you schedule it through the user's crontab instead of root?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sendmail / Aliases

I'm trying to make a script that will automatically read incoming mail, parse the recipient, then send a file off to the recipient. (Name of file = mail.pl) #!/usr/bin/perl $mailDir = "/var/spool/mail/" $user = print `cat <STDIN> | grep To: | cut -b5-`; print `elm -s Awaiting Mail $user <... (1 Reply)
Discussion started by: ComTec
1 Replies

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

3. UNIX for Advanced & Expert Users

sendmail aliases not being honored

Running sendmail Version 8.12.10+Sun on Solaris 9. I need to send mail from this server (serverA) to the mail server (Mserver), which will relay the message to the correct user. If I specify the user specifically, as in: mailx -s"test" John.Doe@company.com test . It works perfectly and... (13 Replies)
Discussion started by: dangral
13 Replies

4. Red Hat

Unable to install & configure Sendmail

Hi All • Regarding installing sendmail pkg in server, I tried to install the pkg but getting the below errors as shown below - any idea on this? • But I have successfully installed sendmail-cf pkg in the server box • But that is not sufficient we also need to install sendmail pkg • Help is... (2 Replies)
Discussion started by: csaha
2 Replies

5. Solaris

Sendmail & SMTP

I have searched this forum extensively and can't seem to find a workable solution to my sendmail issue, but that could be down to my own lack of knowledge so please bear with me... I am using a Sun Solaris 9 box to try and send e-mail to external addresses. The Unix box is not an e-mail server.... (9 Replies)
Discussion started by: KenLynch
9 Replies

6. UNIX for Advanced & Expert Users

Problem with sendmail procmail spamassasin & relay

I have been working on setting up a mail relay. I have just about everything working except for the procmail part. The configuration is as follows: Internet -> mailrelay -> mail server | spamassassin server I have spamassassin running on a seperate... (3 Replies)
Discussion started by: hardesty
3 Replies

7. UNIX for Dummies Questions & Answers

sendmail.cf goes missing & other things

well, I came in today to a raft of messages that users couldn't email from UNIX (HP-UX B.11.23 U i64) /etc/mail/sendmail.cf was missing - just GONE from the directory. Other files were there. mail was successfully sent at 19:48 last night and unsuccessful at 00:10. At least those are times... (5 Replies)
Discussion started by: LisaS
5 Replies

8. UNIX for Dummies Questions & Answers

Using Sendmail (& attachment)

Hi, This is my first thread. Iam trying the following: OS: Sun Database: DB2, Informix, Oracle * Get the status of the database (using database command line options) * pipe to a text file * send mail of the text file to receiptents. TODO1: First step i tried to send a test message.... (3 Replies)
Discussion started by: kenkanya
3 Replies

9. UNIX for Advanced & Expert Users

sendmail: trusted-users or aliases?

For a project that I have been assigned to, I need to send emails to a business partner (business_partner.com) from one production server. However, my emails neither reach their destination nor bounce back to me. Working with our business partner's IT support, the following error was discovered... (1 Reply)
Discussion started by: alan
1 Replies

10. Shell Programming and Scripting

Sendmail - Attachments & Subjects

Hi All, Not been around in a while. However I have been all over tinternet (google) for days looking for a solution. Where I work has decided to use Sendmail on our Linux and Unix estate for sending emails via scripts. So I am hoping to eventually get a working solution for Sendmail and not... (3 Replies)
Discussion started by: dakelly
3 Replies
praliases(1)						      General Commands Manual						      praliases(1)

NAME
praliases - display system mail aliases SYNOPSIS
praliases [-f filename] [--] [alias_name...] OPTIONS
Displays the aliases using the specified dbm file instead of the system aliases file. OPERANDS
The alias name to find. If no aliases are given, then the entire contents of the dbm file are displayed. DESCRIPTION
The praliases command displays system aliases used by the sendmail(8) program. If no arguments are given, the praliases command displays all of the system aliases contained in the file /var/adm/sendmail/aliases. An alternative file can be specified using the -f option. Specific aliases can be displayed by specifying one or more alias names. [Tru64 UNIX] Aliases can be created either with or without the terminating null character ('') considered to be part of the name. Under Tru64 UNIX, an attempt is made to find either version; other vendor's implementations may check only for the key with an embedded NULL. [Tru64 UNIX] The system aliases file under Tru64 UNIX is stored under the /var/adm/sendmail directory. Other vendor's implementations may expect the file to exist under the /etc directory. EXIT STATUS
The following exit values are returned as defined in /usr/include/sysexits.h: No errors occurred. An invalid argument was specified. The specified dbm file does not exists. EXAMPLES
To display all of the system aliases, enter: praliases To display a mailing list called foo, enter: praliases foo To display the contents of a dbm file my_list, enter: praliases -f my_list SEE ALSO
Commands: makemap(8) Files: aliases(4) praliases(1)
All times are GMT -4. The time now is 08:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy