简体   繁体   中英

Procmail not forwarding using ![my email address]

I have an account on a Linux server, and I'd like to have a copy of each non-spam email that's sent to this count be forwarded to my Gmail account.

I added these lines to my .procmailrc file:

:0c:
* .
!sigils.email.address@gmail.com

Here they are in the context of the whole file (sorry for the wall of text, but i don't know procmail well enough to isolate the relevant fragment):

LINEBUF=4096
MAILDIR=/mail/$LOGNAME/Maildir
DEFAULT=/mail/$LOGNAME/Maildir/
#LOGFILE=$HOME/.pmlog
VERBOSE=no

:0
* ^From:.somebody@hotmail.com
.somebody/

:0
* ^Subject:.*test
.IN-testing/

:0
* ^From:.*Network
/dev/null

:0
* ^From:.*Microsoft
/dev/null

:0
* ^From:.*Corporation
/dev/null


# Spam filtering
:0
SCORE=|/usr/bin/spamprobe receive
:0 wf
|/usr/bin/formail -I "X-SpamProbe: $SCORE"
:0 a
*^X-SpamProbe: SPAM
.spam/
:0
./

:0c:
* .
!sigils.email.address@gmail.com

But nothing is being forwarded to my Gmail account. Emails are successfully reaching my account on the Linux server. I checked my Gmail spam folder, but they aren't there either. How do I actually set up copy forwarding?

The earlier delivering recipe takes care of the message, so your forwarding recipe never executes.

:0
./

Switch the order of the last two recipes, or move the c flag from the last recipe to this one.

Incidentally, you can omit the condition to do stuff unconditionally, like you already do in this recipe, but not in the new one you added.

Also, for basic troubleshooting, set VERBOSE=yes and examine the log - this would readily have allowed you to diagnose this yourself.

For more debugging tips, see eg http://www.iki.fi/era/mail/procmail-debug.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM