mail transfer


 
Thread Tools Search this Thread
Operating Systems Linux mail transfer
# 1  
Old 08-27-2004
mail transfer

Hi all!
How do I transfer mail already stored in /var/spool/mail/xxx to another host ? (without using ftp, rcp or any other kind of copy/archiving utility Smilie
I'm using linux/sendmail
Any idea would be greatly appreciated!!!
# 2  
Old 08-27-2004
Why this limitation? (without using ftp, rcp or any other kind of copy/archiving utility)...and why on earth does that limitation make sense to you?
# 3  
Old 08-27-2004
Because i do not have access to those services on the remote mail server ...
Anyway, i discover i can send mail using 'cat mailfile | sendmail touser@somehost.com' but it only process one mail at a time Smilie and the mailbox has 150 msgs, so:
Code:
for i in `seq 150`
do
  echo  s $i file.$i >> forpipe
done

echo x >> forpipe
mail -f /var/spool/mail/usr_mbox < forpipe

for i in file.*
do
  cat $i | sendmail touser@somehost.com
  echo "Sent $i"
  sleep some_time
done

And omitting of course the 1st don't delete mail ...
# 4  
Old 08-27-2004
Well you could of course tar the files up, concatenate them all into a single file, or mail them one at a time! Choice is yours. I probably would use tar first though.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies

2. Shell Programming and Scripting

Not able to drop single mail transfer for different conditions.

. /apps01/wls01/Oracle/Middleware/user_projects/domains/soadomain/bin/setDomainEnv.sh > /dev/null cd /apps01/wls01/Oracle/Middleware/wlserver_10.3/common/bin java weblogic.WLST ServerStatus.py > a.log TEST=`cat a.log | grep WARN | wc -l` if ; then `grep "WARN" a.log > 1.txt` mail... (1 Reply)
Discussion started by: kiran_j
1 Replies

3. UNIX for Dummies Questions & Answers

Minimal Mail Server Setup for Local Mail Transfer

I am trying to get stored mail out of an old mail client. I figured that the easiest way to do it is with IMAP by logging in with both clients. I can copy the mail to the server from the old mail client, and back down into the new mail client. Rather than using a real mail account on the... (2 Replies)
Discussion started by: nixie
2 Replies

4. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

5. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

6. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 Replies

7. UNIX for Dummies Questions & Answers

mail problem (NOT Mail or Mail.app)

When I try to use the CLI mail, I get the following error. What's wrong? Welcome to Darwin! % mail root Subject: test test . EOT % /etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: Group writable directory Do I just need to change the... (1 Reply)
Discussion started by: chenly
1 Replies

8. UNIX for Dummies Questions & Answers

Loggin mail transfer

Hi Folks, I'm trying to log incoming and outgoing messages on my Solaris box. I thought I could use 'mail.info /var/log/maillog' in my syslog.conf but it doesn't give any output. mail.debug does but only seems to log client connections to the server and the odd message ID. Is there a way... (4 Replies)
Discussion started by: Ben
4 Replies
Login or Register to Ask a Question