Re: How can I get mail from /var/mail/jatmin to my spoolfile
- To: mutt-users@xxxxxxxx
- Subject: Re: How can I get mail from /var/mail/jatmin to my spoolfile
- From: bill lam <cbill.lam@xxxxxxxxx>
- Date: Sun, 8 Feb 2009 11:15:31 +0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mail-followup-to:references:mime-version:content-type :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=mhmkSly8QapG1VYHcffVU4cICGvGszBvxO4mjDVj4+Y=; b=CKQSjlxOW1cAZSK5XcyWJ7thu0Af7iNkXJw2GIx/cOZS5aRJR7w7qdmBvYNCsCDZFZ gZ5mTq35LJhTqyyXxbl0If06sesR1zhTyiHCb7ZsBEfbWQRfjTTzNSBTv6nZzegToaSg iy0R3OaDeYpfiLcGjwD16GwoiXglErf25LZhg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; b=Sudbq2XZwUdKT8eeWQ156ud8mzM9FovuaimXmI7JviBs5shGw5I2S37kx/zarg4CvO tqILTk8++y3bQZU3OarYAuE9WvFknbFput0fDcXYqhzUWXPLMcHIXBMiym4P3qZ77azw x3RlBff1r2WGkpuIqpyyNoUjfMD3tBulBl+X0=
- In-reply-to: <20090207085544.GA5570@cinnamon>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- References: <E1LVHfy-0001bR-00@xxxxxxxxxxx> <20090206093029.GA3407@cinnamon> <20090207085544.GA5570@cinnamon>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.19 (2009-01-27)
On Sat, 07 Feb 2009, Josef Atmin wrote:
> After having discovered macros I came up with the following solution for
> moving mail from /var/mail/jatmin to ~/INBOX.
>
> macro index,pager G "\
> <enter-command>unset wait_key<enter>\
> <shell-escape>\
> if [[ -s /var/mail/$USER ]]; then\
> cat /var/mail/$USER >> ~/INBOX;\
> echo -n > /var/mail/$USER;\
> fi<return>\
> <enter-command>set wait_key<enter>\
> <fetch-mail>" "fetch local and pop3 mail"
>
> This seems to do what I want. It is a hack, and I am not quite sure
> whether it is safe (therefore my version within the if-statement looks
> like
>
> cp /var/mail/$USER ~/=var=mail=$USER-backup;\
> cp ~/INBOX ~/INBOX-backup;\
> cat /var/mail/$USER >> ~/INBOX;\
> echo -n > /var/mail/$USER;\
> echo There has been local e-Mail!;\
> sleep 2;\
Did you forget to file lock mail/$USER on entry of script?
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩312 王維 渭城曲
渭城朝雨浥輕塵 客舍青青柳色新 勸君更盡一杯酒 西出陽關無故人