- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: syntax for .forward file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2001 02:56 PM
тАО04-09-2001 02:56 PM
I was using it to plop email sent to a user into a specified directory. For example
\$user, "|cat > ~/mail_dir/mail_msg_$(date +%y-%m-%d-%H:%M:%S)"
This was working but not any more. Also, I was under the impression that you can have a command run everytime you receive a mail message based on this .forward file. For example,
\$user, "|~/script.ksh >> ~/tmp/forward.log"
I'm not sure if this is the correct syntax to do this (the syntax is not explicit on the man pages). If anyone has a clue, please advise. Thanks in advance.
Anthony
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2001 04:33 PM
тАО04-09-2001 04:33 PM
Re: syntax for .forward file
The sendmail folks have gotten security conscious in their old age. I suspect that if you've upgraded to sendmail 8.9.3 (latest on HP I think), you might be getting nailed by the loose permissions.
Specifically, by default sendmail 8.9.3 doesn't like to write to/traverse directories that are group writable. By default, tt also doesn't like group writable .foward files.
To see if this is happening:
/usr/sbin/sendmail:
Copyright (c) 1998 HEWLETT PACKARD COMPANY and its licensors,
including Sendmail, Inc., and the Regents of the
University of California. All rights reserved.
version.c 8.9.3.1 (Berkeley) 2/9/1999 (PHNE_18546)
tail -f /usr/adm/syslog/mail.log [while sending an e-mail to the forward address. sendmail will complain in the log file if it doesn't like the permissions]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2001 06:07 AM
тАО04-10-2001 06:07 AM
Re: syntax for .forward file
The "cat" command is working fine again. The question is, how do you invoke a shell script from the .forward file. Is the syntax that I specified correct? I see the man aliases page, but I have the following on the 2nd line of the .forward file:
\$user, "|~/shell.ksh"
However, when I view the /var/adm/syslog/mail.log I see,
delay=00:00:01, xdelay=00:00:00, mailer=prog, stat=unknown mailer error 1
Apr 9 20:14:48 smell sendmail[15488]: UAA15487: UAA15488: DSN: unknown mailer error
Please advise. Thanks.
Anthony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2001 06:35 AM
тАО04-10-2001 06:35 AM
Re: syntax for .forward file
-make sure that there are no world writeable or group writable directories between / and your script
-make sure the script is not world writable or group writable
-make sure your script returns a proper exit code (see /usr/include/sysexits.h) - exit 0 for success, exit something_else for failure
-make sure your shell is in /etc/shells
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2001 09:14 AM
тАО04-10-2001 09:14 AM
Re: syntax for .forward file
I've tried:
\me, "|/users/me/myscript.ksh"
with and without the quotes. This doesn't work. The concept is, that whenever I receive an e-mail, run this script. The syntax seems to be the problem. As stated before:
\me, "|cat > ~/mail_tmp/mail_msg_$(date +%y-%m-%d-%H:%M:%S)"
this works fine. I definitely appreciate your help. Do you have any other suggestions?
Anthony.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2001 09:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2001 10:24 AM
тАО04-10-2001 10:24 AM
Re: syntax for .forward file
the /etc/shells file was missing from the server. I tried it on another server and it worked find. I owe you lunch!!! Thanks again.
Anthony