Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: droid_cebu on March 29, 2006, 11:57:04 AM
-
Is it possible to configure SME to create cc copies on all outgoing mails to a desired mailbox as a default for all users?
Any advice is greatly appreciated. Thanks
-
droid,
What you want is available from a plugin in qpsmtpd and is called Bcc
From the console as root
config setprop qpsmtpd Bcc enabled BccUser xxx@domain.com
signal-event email-update
where the BccUser is the email address you want all copies of all incoming and outgoing emails to go to.
Note that in some countries you are required by law to notify your users that you are keeping a copy of all their emails. You would be surprised how quickly it cuts down on personal email. However it also has the effect of an increase in the use of hotmail, Yahoo etc
Jon
-
Good Morning,
I'm still looking for a way to block all BCC email as this is the preferred method of spammers. I know that this bucks the whole system and all but as a general rule of thumb, I don't need BCC.
-
I'm still looking for a way to block all BCC email ...
BCC is a feature of individual mail programs. It can't be blocked at the server (otherwise there would be a trivial way to block spam, wouldn't there? And there obviously isn't.).
-
Hi,
Thanks for the help. you did however miss the d on "enable"
It should be "config setprop qpsmtpd Bcc enabled BccUser xxx@domain.com
It worked great!
-
Hi,
I ran the folowing command for cc as default config
config setprop qpsmtpd Bcc enabled BccUser xxx@domain.com
signal-event email-update
But I am not getting copies to the BccUser.
there is an entry in /var/log/qpsmtpd/current as follows
loading bcc mode cc all xxx@domain.com
can anybody point me as to how to debug this.
thanks in advance
Veeresh
-
veeresh
Check your settings with
config show qpsmtpd
The Bcc & BccUser settings should match what you configured
qpsmtpd=service
Bcc=disabled
BccUser=maillog
DNSBL=disabled
LogLevel=6
MaxScannerSize=25000000
RBLList=sbl-xbl.spamhaus.org,whois.rfc-ignorant.org,dnsbl.njabl.org,relays.ordb.org
RHSBL=disabled
RequireResolvableFromHost=no
SBLList=dsn.rfc-ignorant.org
access=public
status=enabled
-
Hi,
Thanks Ray
here is the result of
#config show qpsmtpd
qpsmtpd=service
Bcc=enabled
BccUser=xxx@mydomain.com
DNSBL=disabled
LogLevel=8
MaxScannerSize=25000000
RBLList=sbl-xbl.spamhaus.org,whois.rfc-ignorant.org,dnsbl.njabl.org,relays.ordb.org
RHSBL=disabled
RequireResolvableFromHost=no
SBLList=dsn.rfc-ignorant.org
access=public
status=enabled
but still i do not get BccUser copies
Veeresh
-
veeresh
> BccUser=xxx@mydomain.com
Did you literally enter this as xxx@mydomain.com or have you obfuscated your post ? You should enter the real email address of the cc recipient.
> DNSBL=disabled
> RHSBL=disabled
You might like to enable these settings for greatly improved spam rejection see
http://mirror.contribs.org/smeserver//contribs/rmitchell/smeserver/howto/Spam%20blocking%20HOWTO%20using%20qpsmtpd%20&%20RBL%20for%20sme%20server.htm
-
Hi,
I obfuscated my post, it is not literally xxx@mydomain.com
any further leads
thanks
-
Veeresh, works perfectly for me.
Is xxx@domain.com a user on your server or external?
Can you send an ordinary email to that user and receive it?
Can you send a Bcc email to that user and receive it?
Jon
-
Hi,
Thanks RayMitchell and JonB,
It works fine.
The problem was that i had logged in to the server as root for enabling BccUser. After that I sent the mails from the console itself as root.
these were not copied to BccUser. But when I sent mails from the mail client as any other user i get copies to BccUser.
Is this by design.
Anyways thanks for the support.
Veeresh
-
i try to use the code given
config setprop qpsmtpd Bcc enabled BccUser xxx@domain.com
signal-event email-update
there is no result! i put my own account replace to "xxx@domain.com", the bcc is enabled i can recieve incoming but i can't recieve the outgoing mail
here is the result of
#config show qpsmtpd
qpsmtpd=service
Bcc=enabled
BccUser=aelculladajr@danielefurniture.net
DNSBL=disabled
LogLevel=8
MaxScannerSize=25000000
RBLList=sbl-xbl.spamhaus.org,whois.rfc-ignorant.org,dnsbl.njabl.org,relays.ordb.org
RHSBL=disabled
RequireResolvableFromHost=no
SBLList=dsn.rfc-ignorant.org
access=public
signal-event=email-update
status=enabled
pls help me!
-
Good Morning,
I'm still looking for a way to block all BCC email as this is the preferred method of spammers. I know that this bucks the whole system and all but as a general rule of thumb, I don't need BCC.
Yes, you almost certainly do. Bcc mail is just one case of mail where the envelope recipients do not match the header recipients. Mailing lists are another. Mail systems which don't understand the difference between the envelope and the headers are evil.
-
The problem was that i had logged in to the server as root for enabling BccUser. After that I sent the mails from the console itself as root.
these were not copied to BccUser. But when I sent mails from the mail client as any other user i get copies to BccUser.
Is this by design.
Yes. Mail injected on the server itself is not normally injected via SMTP and so does not pass through qpsmtpd. This means that mail from cron and similar is not stored in the BccUser's mailbox. In general, this is a good thing. Mail injected in the normal ways - SMTP clients and webmail (which is also SMTP) are handled.
-
Ah, whats this
access=public
[b]signal-event=email-update [/b]
status=enabled
You have done a
config setprop qpsmtpd Bcc enabled BccUser xxx@domain.com signal-event email-update
It is actually two commands
Now you need to do
config delprop qpsmtpd signal-event email-update
signal-event email-update
which will remove the incorrect property and reload the email configurations
Note: it is two seperate comands
Jon
-
Now you need to do
config delprop qpsmtpd signal-event email-update
signal-event email-update
which will remove the incorrect property and reload the email configurations
The first line should be just
config delprop qpsmtpd signal-event
-
Oops,
I should check what I am copying and pasting. It will however still work as the command takes only the first property.
Jon
-
Hi,
how can I use qpsmtpd and Bcc to copy only all incoming mails ?
Peer
-
How can I use qpsmtpd and Bcc to copy only all incoming mails ?
As far as I'm aware the Bcc copy only does incoming/outgoing you don't have choice unless you know how to write a qpsmtp plugin
-
Thanks for your fast reply - I think there's a switch
I found this in the script:
Forwards a copy of all mail (or just incoming or outgoing mail) to the
given email address (useful for archiving etc.) ....
=item all <email>
Send a copy of all email to the given address.
=item incoming <email>
Send a copy of all incoming email to the given address. Mail is considered
incoming if it is going to a recipient with a domain in 'rcpthosts'.
=item outgoing <email>
Send a copy of all outgoing email to the given address. Mail is considered
outgoing if it is sent from a relay client.
my ($key, $value) = split /\s+/, $_, 2;
next unless $key =~ m/(mode|all|incoming|outgoing)/;
I trie "config setprop qpsmtpd BccMode incoming" and "config setprop qpsmtpd BccIncoming on"
but sadly without any results perhaps anyone knows the switches or the config file ? I don't find a bcc config file on my server :-( !?
Peer
-
Hi,
how can I delete a wrong entry in qpsmtpd ?
Peer
-
peertopeer
> how can I delete a wrong entry in qpsmtpd ?
I assume you mean qpsmtpd entries in the configuration database
At a command prompt type
db
to show you the syntax
-
Thanks for your fast reply - Idon't know how to use "db"
I want to delete the entry BccUser=xxx@xxx.de
and BccAll=off
Perhaps you can write the syntax ?
Thanks
Peer
-
peertopeer
> I don't know how to use "db"
log in as root and at the command prompt type
db
press enter
it will show you a list of syntax commands to use
Then work out from the entries you have what to do next eg
from an earlier post by jonb
config setprop qpsmtpd Bcc enabled BccUser xxx@domain.com
> Perhaps you can write the syntax ?
You should learn the basics of this as it is fundamental to using sme server
and you can apply it to other db entries/commands
[root@server ~]# db
usage:
/sbin/e-smith/db dbfile keys
/sbin/e-smith/db dbfile print [key]
/sbin/e-smith/db dbfile show [key]
/sbin/e-smith/db dbfile get key
/sbin/e-smith/db dbfile set key type [prop1 val1] [prop2 val2] ...
/sbin/e-smith/db dbfile setdefault key type [prop1 val1] [prop2 val2] ...
/sbin/e-smith/db dbfile delete key
/sbin/e-smith/db dbfile printtype [key]
/sbin/e-smith/db dbfile gettype key
/sbin/e-smith/db dbfile settype key type
/sbin/e-smith/db dbfile printprop key [prop1] [prop2] [prop3] ...
/sbin/e-smith/db dbfile getprop key prop
/sbin/e-smith/db dbfile setprop key prop1 val1 [prop2 val2] [prop3 val3] ...
/sbin/e-smith/db dbfile delprop key prop1 [prop2] [prop3] ...
So you choose the syntax from those listed and put the values in that you wish to change.
It sounds like you want this syntax entry type
/sbin/e-smith/db dbfile delprop key prop1 [prop2] [prop3]
So to delete the entry BccUser=xxx@xxx.de
and BccAll=off
do
/sbin/e-smith/db configuration delprop qpsmtpd BccUser
/sbin/e-smith/db configuration delprop qpsmtpd BccAll
in sme7 you don't need to type the /sbin/e-smith/ part at all
and for the configuration database only, these can be shortened to
config delprop qpsmtpd BccUser
config delprop qpsmtpd BccAll
-
Thanks!! It works fine
-
Now I found a solution to copy only the incoming mails
/var/service/qpsmtpd/config/peers -> shows in all files
bcc mode cc all xxxx@xxxx.com
I change this to
bcc mode cc incoming xxxx@xxxx.com
Sadly I don't know the real switch for config setprop qpsmtpd :-(
at the moment after a signal-event email-update
"all" overwrite "incoming" and you have to edit the files once more
Perhaps someone knows the switch !? By the way thanks to Gavin Carr (the programmer of the bcc plugin) he helped me to find the switch in the peers
Peer
-
peertopeer
> Sadly I don't know the real switch for config setprop qpsmtpd
> at the moment after a signal-event email-update
> "all" overwrite "incoming" and you have to edit the files once more
You can't just use/create new db entries/switches because you'd like to have one, the base code needs to support those db entries.
What you are experiencing is by design, if you change config files directly these will be overwritten with system default vales the next time a system event occurs.
The sme way to make changes permanent when there is no db entry available to make the change, is to create custom templates. Whenever a system event occurs these "new" default values in .../templates-custom/... will override the system default values in the normal templates/databases.
I suggest you read the Developers guide as it explains the templating process and then look at the template fragments code for qpsmtpd or whichever config file you have changed.
The devguide also explains howto create (generic) custom templates.
You need to apply that knowledge to your particular requirement.
-
Also have a look at how we did it here ;)
http://bugs.contribs.org/show_bug.cgi?id=13