diff --git a/app/models/channel/driver/mail_stdin.rb b/app/models/channel/driver/mail_stdin.rb index fcedbb1f4..b6257b84a 100644 --- a/app/models/channel/driver/mail_stdin.rb +++ b/app/models/channel/driver/mail_stdin.rb @@ -12,13 +12,17 @@ e. g. cat test/fixtures/mail1.box | rails r 'Channel::Driver::MailStdin.new' +e. g. if you want to trust on mail headers + + cat test/fixtures/mail1.box | rails r 'Channel::Driver::MailStdin.new(trusted: true)' + =end - def initialize + def initialize(params = {}) Rails.logger.info 'read main from STDIN' msg = ARGF.read - process({}, msg) + process(params, msg) end end diff --git a/doc/X-Headers.txt b/doc/X-Headers.txt deleted file mode 100644 index a429f7ff5..000000000 --- a/doc/X-Headers.txt +++ /dev/null @@ -1,40 +0,0 @@ -X-Zammad-Priority: (1 low|2 normal|3 high) ------------------------------------------- -Set priority of ticket (for whole list check your database). - -X-Zammad-Group: [one system group] ----------------------------------- -Presort of group (highest sort priority). - -X-Zammad-Owner: [login of agent] --------------------------------- -Assign ticket to agent. - -X-Zammad-Ignore: [yes|true] -------------------------- -Ignore this email. - -X-Zammad-State: (new|open|...) ------------------------------- -Set state of ticket (for whole list check your database)! Be careful! - -X-Zammad-Article-Sender: (Agent|System|Customer) -------------------------------------------------- -Info about the sender. - -X-Zammad-Article-Type: (email|phone|fax|sms|webrequest|note|twitter status|direct-message|facebook|...) -------------------------------------------------------------------------------------------------------- -Article type (for whole list check your database). - -X-Zammad-Article-Visibility: (internal|external) ------------------------------------------------- -Article visibility. - -X-Zammad-Customer-Email: [email address] ----------------------------------------- -Set customer via explicit email. - -X-Zammad-Customer-Login: [login] --------------------------------- -Set customer via explicit login. - diff --git a/doc/x-headers.md b/doc/x-headers.md new file mode 100644 index 000000000..0cbbfc042 --- /dev/null +++ b/doc/x-headers.md @@ -0,0 +1,81 @@ +# Ticket-Attributes + +For ticket creation use "X-Zammad-Ticket-Attribute: some value", if you want to change +ticket attributes on follow up, use "X-Zammad-Ticket-FollowUp-Attribute: some value". + + +## X-Zammad-Ticket-Priority + +Example: X-Zammad-Ticket-Priority: (1 low|2 normal|3 high) + +Set priority of ticket (for whole list check your database). + + +## X-Zammad-Ticket-Group + +Example: X-Zammad-Ticket-Group: [one system group] + +Presort of group (highest sort priority). + + +## X-Zammad-Ticket-Owner + +Example: X-Zammad-Ticket-Owner: [login of agent] + +Assign ticket to agent. + + +## X-Zammad-Ticket-State + +Example: X-Zammad-Ticket-State: (new|open|...) + +Set state of ticket (for whole list check your database)! Be careful! + +## X-Zammad-Customer-Email + +Example: X-Zammad-Customer-Email: [email address] + +Set customer via explicit email. + + +## X-Zammad-Customer-Login + +Example: X-Zammad-Customer-Login: [login] + +Set customer via explicit login. + + +# Article-Attributes + +Every time if an article is created (new ticket or/and follow up) you can use +"X-Zammad-Article-Attribute: some value". + + +## X-Zammad-Article-Sender + +Example: X-Zammad-Article-Sender: (Agent|System|Customer) + +Info about the sender. + + +## X-Zammad-Article-Type + +Example: X-Zammad-Article-Type: (email|phone|fax|sms|webrequest|note|twitter status|direct-message|facebook|...) + +Article type (for whole list check your database). + + +## X-Zammad-Article-Visibility + +Example: X-Zammad-Article-Visibility: (internal|external) + +Article visibility. + + +# Ignore Header + +If you want to ignore whole email, just set the "X-Zammad-Ignore" header. + +Example: X-Zammad-Ignore: [yes|true] + +Ignore this email. \ No newline at end of file