see if you have mbpath installed (part of the cysrus package). This should enable you to find out the correct location of the users mail spool. Under that there may be hidden directories and files, so ls -a will help.
here is the man page for formail (sorry, I misspelled it earlier) formail
which is probably what you will end up using as once you have the hang of it, it is so easy to script.
formail as such doesn't really help here, it's useful for splitting an mbox file into individual messages and replacing headers, but I don't think you need either here.
A somewhat desperate but perhaps acceptable workaround would be to simply resend those messages. Some Received: headers will be added and you might get the wrong envelope sender, but those might not be of any importance to you.
If you have a file which contains a valid email message, just submit it with sendmail. It should have some headers, an empty line, and a body. I supply an example below.
Given a set of files like this, you can send them with sendmail:
Here's what a simple email message looks like. It's just a text file.
If there's a "From " line (without a colon) as the first line, you want to discard that somehow. sed '1{;/^From /d;}' would seem like a typical way to do that.
There are likely to be Received: headers and what not, but that's a basic simple message. If you have MIME structure, that adds some complexity as well, but fundamentally, SMTP mail is just a piece of basic 7-bit US-ASCII text. See the RFCs and various tutorials for more information.
I have a existing perl program , in this program it will output a email address list to a variable ( $email_list ) , mail content to a variable ( $email_content ) , if I want to send all email to these email address with corresponding content , would aadivse how to write a perl script ?
thanks (2 Replies)
Hi all
I have a Live SMTP server for outbound mails ( Mail being sent from my organization to outside domains).
A large chunk of mails are not being sent and reside in /var/spool/mqueue directory.
The header of there mails are:
From: Mail Delivery Subsystem <MAILER-DAEMON>
How can I... (0 Replies)
Hi All,
I used before a simple routine code in tcl to send mail.
package require smtp
package require mime
package require Tcl
proc send_simple_message {recipient email_server subject body} {
set token
mime::setheader $token Subject $subject
smtp::sendmessage $token \
... (0 Replies)
Hey Guys,
I am writing an SMTP mail client in c++ in unix and it needs to do the following:
I need to create a client
the client talks to port 25
it sends a hello world message
I also need to support and smtpclient class and a clientdriver class
I have written the smtpclient class, but I... (1 Reply)
Hi I need to send email from batch script, using SMTP from my exchange server. Can any one send me command line of that should be non interactive.
I did using MAPISEND, but i should not use it for some reasons. I have to send this using SMTP for Microsoft Exchange Server.
mapisend -u... (2 Replies)
Hi all,
I need to send mail to a particular email id using a local mail server.This mail shall contain the content of a file. I don't have any idea how to do it. Can anyone guide me ,where to start proceeding for it. Any guide or study material would appreciated. (1 Reply)
Hi Gururs,
I have a process on a middelware (SAP XI) that is runnung on HP-UX. This Process is creating a flatfile. Now I want to call a script within the process that sends the created flatfile as attachment via Mail using a smpt-server.
The script should have the following input parameters:... (2 Replies)
I want to send e-mail from my yahoo account.
But
mail -s "title" *@yahoo.com < line.txt
is from my local address to *@yahoo.com.
How can i do this? (1 Reply)
Hi All
I have a slight problem with sending mails from my server - if I send mails to Yahoo! or Hotmail, either direct via the SMTP server, or through sendmail, the email ends up in the account holder's Junk Mail folder.
Is something in the headers causing these emails to be treated as junk?... (3 Replies)