Koozali.org: home of the SME Server

cc copy as a default config

Offline JonB

  • *
  • 351
  • +0/-0
cc copy as a default config
« Reply #15 on: February 22, 2007, 09:18:45 AM »
Ah, whats this

Code: [Select]
access=public
[b]signal-event=email-update [/b]
status=enabled


You have done a

Code: [Select]
config setprop qpsmtpd Bcc enabled BccUser xxx@domain.com signal-event email-update

It is actually two commands

Now you need to do

Code: [Select]
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
...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
cc copy as a default config
« Reply #16 on: February 22, 2007, 03:50:49 PM »
Quote from: "JonB"

Now you need to do

Code: [Select]
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

Code: [Select]

config delprop qpsmtpd signal-event

Offline JonB

  • *
  • 351
  • +0/-0
cc copy as a default config
« Reply #17 on: February 22, 2007, 09:07:43 PM »
Oops,

I should check what I am copying and pasting. It will however still work as the command takes only the first property.

Jon
...

peertopeer

cc copy as a default config
« Reply #18 on: March 05, 2007, 04:25:50 PM »
Hi,

how can I use qpsmtpd and Bcc to copy only all incoming mails ?

Peer

Offline byte

  • *
  • 2,183
  • +2/-0
cc copy as a default config
« Reply #19 on: March 05, 2007, 07:02:34 PM »
Quote from: "peertopeer"

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
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

peertopeer

cc copy as a default config
« Reply #20 on: March 06, 2007, 12:26:04 PM »
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.

Code: [Select]

    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

peertopeer

cc copy as a default config
« Reply #21 on: March 14, 2007, 09:38:21 AM »
Hi,

how can I delete a wrong entry in qpsmtpd ?

Peer

Offline raem

  • *
  • 3,972
  • +4/-0
cc copy as a default config
« Reply #22 on: March 14, 2007, 10:57:53 AM »
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
...

peertopeer

cc copy as a default config
« Reply #23 on: March 14, 2007, 11:30:18 AM »
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

Offline raem

  • *
  • 3,972
  • +4/-0
cc copy as a default config
« Reply #24 on: March 14, 2007, 02:19:04 PM »
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
...

peertopeer

cc copy as a default config
« Reply #25 on: March 14, 2007, 03:26:40 PM »
Thanks!! It works fine

peertopeer

cc copy as a default config
« Reply #26 on: March 16, 2007, 12:58:46 PM »
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

Offline raem

  • *
  • 3,972
  • +4/-0
cc copy as a default config
« Reply #27 on: March 16, 2007, 10:09:10 PM »
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.
...

Offline byte

  • *
  • 2,183
  • +2/-0
cc copy as a default config
« Reply #28 on: March 17, 2007, 12:14:19 AM »
Also have a look at how we did it here ;)

http://bugs.contribs.org/show_bug.cgi?id=13
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!