On Tue, Dec 04, 2001 at 11:37:06AM +0530, H.S.Rai wrote:
> On Mon, 3 Dec 2001, USM Bish wrote:
>
> | Only thing is you need to take out all the addresses from
> | the pine addressbook first ...
>
> This seems to be complex task!!! :-(
>
Quite simple really. This small script will extract all
addresses for you in the type of file suitable for use
under mailx or for clipping into the script using send-
mail -t. Note: pine keeps all addresses in .addressbook
This acript will extract all addresses alone to a file
called pine.address.db.
-------<snip>-------
#!/bin/sh
cd $HOME
> pine.address.db
for i in `cat .addressbook`; do
echo $i | grep "@" >> pine.address.db
done
exit 0
-------</snip>-------
>
> I seems to serve my purpose, but I feel there is one
> problem. This process submit mail in queue as sender
> [EMAIL PROTECTED] , this makes mail
> to be rejected by most server with reason that
> my_pc_name.valid_domain does not exist.
>
> How to change this sender.
>
What is your MTA ? You need to rewrite your aliases
file in /etc or /etc/mail (depending upon version) for
sendmail. It is to have a section like this at the end
of /etc/mail/aliases file:
# trap decode to catch security attacks
decode: root
bish: [EMAIL PROTECTED]
hsrai: [EMAIL PROTECTED]
This is assuming you have users on your box called
bish and hsrai, who would like to have their mails
go as e-mail ids as above, when they mail from their
own log-ins. root@domain will come when mailing with
root privileges or as "root" log-in.
Ofcourse, you will have to remake your alias.db for
sendmail, with the ususal m4 method. I am not very
sure of other MTAs ... others need to chip in here.
>
> In pine using role I was able to submit mail from
> different valid domain name.
>
> Can we alter this in directly sendmail -t .... pro-
> cedure.
>
Yes, you can. Explicitly state From: in the header,
of the script I posted yesterday. viz:
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc:
Bcc: [EMAIL PROTECTED],
[EMAIL PROTECTED]
Subject: Mail only for you
Reply-To: [EMAIL PROTECTED]
HTH
Bish.
--
:
####[ Linux One Stanza Tip (LOST) ]###########################
Sub : Locking a directory LOST #013
To "lock" a directory under your $HOME directory for privacy
of data, do:
$chmod 000 dir/ .... ["root" still has access though]
Changing permission to 000 even denies an ls to that dir by
all users. You need to do chmod 755 or 777 (for access).
####<[EMAIL PROTECTED]>###################################
:
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help